From aa318568c4d4f3f34bc6149fd14a5b77f1243c18 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 6 Jul 2010 15:06:25 -0500 Subject: [PATCH] revert --- src/switch_core_sqldb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 5395f502c2..7fc32c0a3f 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -35,8 +35,6 @@ #include #include "private/switch_core_pvt.h" -#define SQL_QUEUE_MAX = - static struct { switch_cache_db_handle_t *event_db; switch_queue_t *sql_queue[2]; @@ -1255,13 +1253,14 @@ static void core_event_handler(switch_event_t *event) } if (sql_idx) { - int i = 0, x = 0; + int i = 0; for (i = 0; i < sql_idx; i++) { - if (!switch_stristr("insert", sql[i])) { - x = 1; + if (switch_stristr("update channels", sql[i]) || switch_stristr("delete from channels", sql[i])) { + switch_queue_push(sql_manager.sql_queue[1], sql[i]); + } else { + switch_queue_push(sql_manager.sql_queue[0], sql[i]); } - switch_queue_push(sql_manager.sql_queue[x], sql[i]); sql[i] = NULL; } }