From 88a681d47c5b2d46c2f11bb3ef276d1d70916e6e Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 4 Aug 2011 23:21:38 -0500 Subject: [PATCH] fix typo in sql stmt --- src/switch_core_sqldb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 897cbe9ebd..a55d3ee905 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -1364,8 +1364,8 @@ static void core_event_handler(switch_event_t *event) switch_event_get_header_nil(event, "unique-id")); free(extra_cols); } else { - new_sql() = switch_mprintf("update channels set state='%s',cid_name='%q',cid_num='%q',callee_name='%q'," - "sent_callee_name='%q',sent_callee_num='%q', callee_num='%q'," + new_sql() = switch_mprintf("update channels set state='%s',cid_name='%q',cid_num='%q',callee_name='%q',callee_num='%q'," + "sent_callee_name='%q',sent_callee_num='%q'," "ip_addr='%s',dest='%q',dialplan='%q',context='%q',presence_id='%q',presence_data='%q' " "where uuid='%s'", switch_event_get_header_nil(event, "channel-state"), @@ -1511,6 +1511,7 @@ static void core_event_handler(switch_event_t *event) if (sql_idx) { int i = 0; + for (i = 0; i < sql_idx; i++) { if (switch_stristr("update channels", sql[i]) || switch_stristr("delete from channels", sql[i])) {