]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
rearrange order of sql stmts
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 2 Nov 2011 22:20:15 +0000 (17:20 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 2 Nov 2011 22:20:20 +0000 (17:20 -0500)
src/mod/applications/mod_fifo/mod_fifo.c

index 39b86ef4aabed318a50d0a303bb92b2e90be46c4..c9b6f12073f0df2069ac778a337702508264a968 100644 (file)
@@ -638,9 +638,6 @@ static void cancel_caller_outbound_call(const char *key, switch_call_cause_t cau
                *cancel_cause = cause;
        }
        switch_mutex_unlock(globals.caller_orig_mutex);
-
-       fifo_caller_del(key);
-
 }
 
 
@@ -2564,8 +2561,6 @@ SWITCH_STANDARD_APP(fifo_function)
 
                switch_channel_clear_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_BRIDGE_TAG);
 
-               fifo_caller_del(switch_core_session_get_uuid(session));
-
                if (!aborted && switch_channel_ready(channel)) {
                        switch_channel_set_state(channel, CS_HIBERNATE);
                        goto done;
@@ -2605,6 +2600,8 @@ SWITCH_STANDARD_APP(fifo_function)
 
                check_ocancel(session);
 
+               fifo_caller_del(switch_core_session_get_uuid(session));
+
                goto done;
 
        } else {                                        /* consumer */
@@ -3031,6 +3028,8 @@ SWITCH_STANDARD_APP(fifo_function)
 
 
                                fifo_execute_sql(sql, globals.sql_mutex);
+                               fifo_caller_del(switch_core_session_get_uuid(other_session));
+
                                switch_safe_free(sql);