Changeset 581 for pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
- Timestamp:
- Jul 3, 2006 2:18:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r561 r581 89 89 90 90 91 #if defined(PJSIP_SAFE_MODULE) && PJSIP_SAFE_MODULE!=0 92 # define LOCK_MODULE_ACCESS(ept) pj_rwmutex_lock_read(ept->mod_mutex) 93 # define UNLOCK_MODULE_ACCESS(ept) pj_rwmutex_unlock_read(ept->mod_mutex) 94 #else 95 # define LOCK_MODULE_ACCESS(endpt) 96 # define UNLOCK_MODULE_ACCESS(endpt) 97 #endif 98 99 91 100 92 101 /* … … 582 591 PJ_LOG(6, (THIS_FILE, "Releasing pool %s", pj_pool_getobjname(pool))); 583 592 584 pj_mutex_lock(endpt->mutex); 593 /* Don't need to acquire mutex since pool factory is thread safe 594 pj_mutex_lock(endpt->mutex); 595 */ 585 596 pj_pool_release( pool ); 597 598 /* 586 599 pj_mutex_unlock(endpt->mutex); 600 */ 587 601 } 588 602 … … 777 791 778 792 /* Distribute to modules, starting from modules with highest priority */ 779 pj_rwmutex_lock_read(endpt->mod_mutex);793 LOCK_MODULE_ACCESS(endpt); 780 794 781 795 if (msg->type == PJSIP_REQUEST_MSG) { … … 824 838 } 825 839 826 pj_rwmutex_unlock_read(endpt->mod_mutex);840 UNLOCK_MODULE_ACCESS(endpt); 827 841 828 842 /* Must clear mod_data before returning rdata to transport, since … … 843 857 844 858 /* Distribute to modules, starting from modules with LOWEST priority */ 845 pj_rwmutex_lock_read(endpt->mod_mutex);859 LOCK_MODULE_ACCESS(endpt); 846 860 847 861 mod = endpt->module_list.prev; … … 865 879 } 866 880 867 pj_rwmutex_unlock_read(endpt->mod_mutex);881 UNLOCK_MODULE_ACCESS(endpt); 868 882 869 883 return status;
Note: See TracChangeset
for help on using the changeset viewer.