]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-597
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Apr 2010 21:38:05 +0000 (16:38 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Apr 2010 21:38:05 +0000 (16:38 -0500)
src/switch_core_sqldb.c

index 9e02a91c8e576bb07e6f3594f2381b203e54bea8..1e0d4e9d89aee7369056ce36c90acbc502851c14 100644 (file)
@@ -958,6 +958,7 @@ static void core_event_handler(switch_event_t *event)
        case SWITCH_EVENT_CHANNEL_DESTROY:
                sql = switch_mprintf("delete from channels where uuid='%q' and hostname='%q'",
                                                         switch_event_get_header_nil(event, "unique-id"), switch_core_get_variable("hostname"));
+               printf("%s\n", sql);
                break;
        case SWITCH_EVENT_CHANNEL_UUID:
                {
@@ -1143,7 +1144,7 @@ static void core_event_handler(switch_event_t *event)
        }
 
        if (sql) {
-               if (switch_stristr("update channels", sql)) {
+               if (switch_stristr("update channels", sql) || switch_stristr("delete from channels", sql)) {
                        switch_queue_push(sql_manager.sql_queue[1], sql);
                } else {
                        switch_queue_push(sql_manager.sql_queue[0], sql);