mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
close up some race conditions fit for the indy 500
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7732 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -222,6 +222,10 @@ void sofia_event_callback(nua_event_t event,
|
||||
nua_event_name(event), status, phrase, session ? switch_channel_get_name(channel) : "n/a");
|
||||
}
|
||||
|
||||
if (tech_pvt) {
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
}
|
||||
|
||||
if ((profile->pflags & PFLAG_AUTH_ALL) && tech_pvt && tech_pvt->key && sip) {
|
||||
sip_authorization_t const *authorization = NULL;
|
||||
|
||||
@@ -343,10 +347,15 @@ void sofia_event_callback(nua_event_t event,
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (gateway) {
|
||||
sofia_reg_release_gateway(gateway);
|
||||
}
|
||||
|
||||
if (tech_pvt) {
|
||||
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||
}
|
||||
|
||||
if (session) {
|
||||
switch_core_session_rwunlock(session);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user