]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_callcenter: Fix invalid update of agent field FS-2738
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Mon, 27 Sep 2010 14:12:10 +0000 (10:12 -0400)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Mon, 27 Sep 2010 14:12:10 +0000 (10:12 -0400)
src/mod/applications/mod_callcenter/mod_callcenter.c

index 5da8c1fe8ae050a17ded9eaa7d9f719aaa6631f6..b58e647e3bf1dcc74be6e1f5c0b53c8ef81114ba 100644 (file)
@@ -1498,7 +1498,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
 
                /* Update Agents Items */
                /* Do not remove uuid of the agent if we are a standby agent */
-               sql = switch_mprintf("UPDATE agents SET %q last_bridge_end = %ld, talk_time = talk_time + (%ld-last_bridge_start) WHERE name = '%q' AND system = '%q';"
+               sql = switch_mprintf("UPDATE agents SET %s last_bridge_end = %ld, talk_time = talk_time + (%ld-last_bridge_start) WHERE name = '%q' AND system = '%q';"
                                , (strcasecmp(h->agent_type, CC_AGENT_TYPE_UUID_STANDBY)?"uuid = '',":""),  (long) switch_epoch_time_now(NULL), (long) switch_epoch_time_now(NULL), h->agent_name, h->agent_system);
                cc_execute_sql(NULL, sql, NULL);
                switch_safe_free(sql);