]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 20 Mar 2009 17:03:46 +0000 (17:03 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 20 Mar 2009 17:03:46 +0000 (17:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12686 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index fd04e837c4955a4572ef108e8543d52bfee184ae..90836bd99083b1d6ee4859850719a8fa82ba5a0e 100644 (file)
@@ -344,19 +344,13 @@ void sofia_event_callback(nua_event_t event,
                                tech_pvt = switch_core_session_get_private(session);
                                channel = switch_core_session_get_channel(session);
                                if (tech_pvt) {
-
-                                       if (status >= 300) {
-                                               sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
-                                       }
-
                                        switch_mutex_lock(tech_pvt->sofia_mutex);
                                        locked = 1;                                                                             
                                } else {
                                        switch_core_session_rwunlock(session);
                                        return;
                                }
-                               
-                               
+
                                if (status >= 180 && !*sofia_private->auth_gateway_name) {
                                        const char *gwname = switch_channel_get_variable(channel, "sip_use_gateway");
                                        if (!switch_strlen_zero(gwname)) {
@@ -3338,6 +3332,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                        tech_pvt->q850_cause = SWITCH_CAUSE_MANDATORY_IE_MISSING;
                }
        case nua_callstate_terminated:
+               sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
                if (sofia_test_flag(tech_pvt, TFLAG_NOHUP)) {
                        sofia_clear_flag_locked(tech_pvt, TFLAG_NOHUP);
                } else if (switch_channel_up(channel)) {
index 82f46c58890dc713a7f44994c58e15628311c642..3ddb9488b74c1eb4964feb0e590e09b6c2c757ce 100644 (file)
@@ -2375,6 +2375,7 @@ switch_status_t sofia_glue_tech_media(private_object_t *tech_pvt, const char *r_
                return SWITCH_STATUS_SUCCESS;
        }
 
+
        return SWITCH_STATUS_FALSE;
 }