]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 22 Aug 2012 22:05:25 +0000 (17:05 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 22 Aug 2012 22:05:25 +0000 (17:05 -0500)
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index b3e0f4c0f88b3dc0166fa1de7a58cb4c0a5e3df1..f8262b907ecb97dc3ccd4a985d52fc0dffb75b00 100644 (file)
@@ -1744,12 +1744,12 @@ void sofia_event_callback(nua_event_t event,
                }
 
                if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
-                       if (!switch_core_session_running(session)) {
+                       if (!switch_core_session_running(session) && !switch_core_session_started(session)) {
                                nua_handle_bind(nh, NULL);
                                sofia_private_free(sofia_private);
                                switch_core_session_destroy(&session);
                                nua_respond(nh, 503, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
-                       }                       
+                       }
                        goto end;
                }
 
index ceb4343fb908f0f7b95c90880a076c0b3a79817c..0f20a8a4f781057f500ab1e752b0080732c9c677 100644 (file)
@@ -5743,12 +5743,7 @@ int sofia_recover_callback(switch_core_session_t *session)
        }
 
 
-       if (!(tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
-               switch_core_session_destroy(&session);
-               goto end;
-       }
-
+       tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t));
        tech_pvt->channel = channel;
 
        switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));