Changeset 5680 for pjproject/trunk/pjlib/src/pj/activesock.c
- Timestamp:
- Nov 3, 2017 6:54:54 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/activesock.c
r5119 r5680 297 297 PJ_DEF(pj_status_t) pj_activesock_close(pj_activesock_t *asock) 298 298 { 299 pj_ioqueue_key_t *key; 300 pj_bool_t unregister = PJ_FALSE; 301 299 302 PJ_ASSERT_RETURN(asock, PJ_EINVAL); 300 303 asock->shutdown = SHUT_RX | SHUT_TX; 301 if (asock->key) { 302 pj_ioqueue_unregister(asock->key); 304 305 /* Avoid double unregistration on the key */ 306 key = asock->key; 307 if (key) { 308 pj_ioqueue_lock_key(key); 309 unregister = (asock->key != NULL); 310 asock->key = NULL; 311 pj_ioqueue_unlock_key(key); 312 } 313 314 if (unregister) { 315 pj_ioqueue_unregister(key); 303 316 304 317 #if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ … … 306 319 activesock_destroy_iphone_os_stream(asock); 307 320 #endif 308 309 asock->key = NULL;310 321 } 311 322 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.