Skip to content

Commit 50b4164

Browse files
authored
Acquire pjsua lock before transport manager lock to maintain consistent lock order (#4684)
1 parent fa58762 commit 50b4164

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pjsip/src/pjsua-lib/pjsua_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4161,9 +4161,11 @@ PJ_DEF(pj_status_t) pjsua_handle_ip_change(const pjsua_ip_change_param *param)
41614161
sd_param.include_udp = PJ_FALSE;
41624162

41634163
PJ_LOG(4,(THIS_FILE, "IP change shutting down transports.."));
4164+
PJSUA_LOCK();
41644165
status = pjsip_tpmgr_shutdown_all(
41654166
pjsip_endpt_get_tpmgr(pjsua_var.endpt),
41664167
&sd_param);
4168+
PJSUA_UNLOCK();
41674169

41684170
/* Provide dummy info instead of NULL info to avoid possible crash
41694171
* (if app does not check).

0 commit comments

Comments
 (0)