Changeset 3999 for pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
- Timestamp:
- Mar 30, 2012 7:10:13 AM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r3841 r3999 715 715 716 716 pj_mutex_unlock(mod_tsx_layer.mutex); 717 718 PJ_LOG(4,(THIS_FILE, "Stopped transaction layer module")); 719 717 720 return PJ_SUCCESS; 721 } 722 723 724 /* Destroy this module */ 725 static void tsx_layer_destroy(pjsip_endpoint *endpt) 726 { 727 PJ_UNUSED_ARG(endpt); 728 729 /* Destroy mutex. */ 730 pj_mutex_destroy(mod_tsx_layer.mutex); 731 732 /* Release pool. */ 733 pjsip_endpt_release_pool(mod_tsx_layer.endpt, mod_tsx_layer.pool); 734 735 /* Free TLS */ 736 pj_thread_local_free(pjsip_tsx_lock_tls_id); 737 738 /* Mark as unregistered. */ 739 mod_tsx_layer.endpt = NULL; 740 741 PJ_LOG(4,(THIS_FILE, "Transaction layer module destroyed")); 718 742 } 719 743 … … 730 754 * from transport and when it tries to unregister itself. 731 755 */ 732 if (pj_hash_count(mod_tsx_layer.htable) != 0) 756 if (pj_hash_count(mod_tsx_layer.htable) != 0) { 757 if (pjsip_endpt_atexit(mod_tsx_layer.endpt, &tsx_layer_destroy) != 758 PJ_SUCCESS) 759 { 760 PJ_LOG(3,(THIS_FILE, "Failed to register transaction layer " 761 "module destroy.")); 762 } 733 763 return PJ_EBUSY; 734 735 /* Destroy mutex. */ 736 pj_mutex_destroy(mod_tsx_layer.mutex); 737 738 /* Release pool. */ 739 pjsip_endpt_release_pool(mod_tsx_layer.endpt, mod_tsx_layer.pool); 740 741 /* Free TLS */ 742 pj_thread_local_free(pjsip_tsx_lock_tls_id); 743 744 /* Mark as unregistered. */ 745 mod_tsx_layer.endpt = NULL; 746 747 PJ_LOG(4,(THIS_FILE, "Transaction layer module destroyed")); 764 } 765 766 tsx_layer_destroy(mod_tsx_layer.endpt); 748 767 749 768 return PJ_SUCCESS; … … 3240 3259 PJ_UNUSED_ARG(tsx); 3241 3260 PJ_UNUSED_ARG(event); 3242 pj_assert(!"Not expecting any events!!"); 3243 return PJ_EBUG; 3244 } 3245 3261 3262 // See https://trac.pjsip.org/repos/ticket/1432 3263 //pj_assert(!"Not expecting any events!!"); 3264 3265 return PJ_EIGNORED; 3266 } 3267
Note: See TracChangeset
for help on using the changeset viewer.