Changeset 141a20d in mainline for uspace/srv/net/udp/assoc.c
- Timestamp:
- 2012-08-13T10:40:17Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1e2df13
- Parents:
- e5e73af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/assoc.c
re5e73af r141a20d 264 264 265 265 fibril_mutex_lock(&assoc->lock); 266 while (list_empty(&assoc->rcv_queue) ) {266 while (list_empty(&assoc->rcv_queue) && !assoc->reset) { 267 267 log_msg(LVL_DEBUG, "udp_assoc_recv() - waiting"); 268 268 fibril_condvar_wait(&assoc->rcv_queue_cv, &assoc->lock); 269 } 270 271 if (assoc->reset) { 272 log_msg(LVL_DEBUG, "udp_assoc_recv() - association was reset"); 273 fibril_mutex_unlock(&assoc->lock); 274 return ECONNABORTED; 269 275 } 270 276 … … 308 314 } 309 315 316 /** Reset association. 317 * 318 * This causes any pendingreceive operations to return immediately with 319 * UDP_ERESET. 320 */ 321 void udp_assoc_reset(udp_assoc_t *assoc) 322 { 323 fibril_mutex_lock(&assoc->lock); 324 assoc->reset = true; 325 fibril_condvar_broadcast(&assoc->rcv_queue_cv); 326 fibril_mutex_unlock(&assoc->lock); 327 } 328 310 329 static int udp_assoc_queue_msg(udp_assoc_t *assoc, udp_sockpair_t *sp, 311 330 udp_msg_t *msg)
Note:
See TracChangeset
for help on using the changeset viewer.