]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-2801
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 28 Oct 2010 20:34:42 +0000 (15:34 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 28 Oct 2010 20:34:56 +0000 (15:34 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 833cf6c51f058190d0c55927454f440865f72c53..0f9e265c4d2bcf067ceba2633b7e7f6f052dcf3d 100644 (file)
@@ -4684,7 +4684,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                        if (!switch_channel_get_variable(other_channel, SWITCH_B_SDP_VARIABLE)) {
                                                switch_channel_set_variable(other_channel, SWITCH_B_SDP_VARIABLE, r_sdp);
                                        }
+                                       switch_mutex_unlock(tech_pvt->sofia_mutex);
                                        switch_channel_pre_answer(other_channel);
+                                       switch_mutex_lock(tech_pvt->sofia_mutex);
                                        switch_core_session_rwunlock(other_session);
                                }
                                goto done;
@@ -5112,7 +5114,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                        if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
                                                && (other_session = switch_core_session_locate(uuid))) {
                                                other_channel = switch_core_session_get_channel(other_session);
+                                               switch_mutex_unlock(tech_pvt->sofia_mutex);
                                                switch_channel_answer(other_channel);
+                                               switch_mutex_lock(tech_pvt->sofia_mutex);
                                                switch_core_session_rwunlock(other_session);
                                        }
                                }
@@ -5141,7 +5145,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                if (!switch_channel_get_variable(other_channel, SWITCH_B_SDP_VARIABLE)) {
                                                        switch_channel_set_variable(other_channel, SWITCH_B_SDP_VARIABLE, r_sdp);
                                                }
+                                               switch_mutex_unlock(tech_pvt->sofia_mutex);
                                                switch_channel_answer(other_channel);
+                                               switch_mutex_lock(tech_pvt->sofia_mutex);
                                                switch_core_session_rwunlock(other_session);
                                        }
                                        goto done;