Merge pull request #1273 in FS/freeswitch from ~EDUARDO/freeswitch:FS-10304-prevent-infinite-logging-when-a to master
* commit 'be741eab2ce34122755198c31894941f6e7da7d2': FS-10304: [mod_callcenter] Prevent infinite logging when a stale queue member in found in the database
This commit is contained in:
commit
38ff0f79e9
|
@ -2361,7 +2361,10 @@ static int members_callback(void *pArg, int argc, char **argv, char **columnName
|
||||||
cbt.member_system = argv[10];
|
cbt.member_system = argv[10];
|
||||||
|
|
||||||
if (!cbt.queue_name || !(queue = get_queue(cbt.queue_name))) {
|
if (!cbt.queue_name || !(queue = get_queue(cbt.queue_name))) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Queue %s not found locally, skip this member\n", cbt.queue_name);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Queue %s not found locally, delete this member\n", cbt.queue_name);
|
||||||
|
sql = switch_mprintf("DELETE FROM members WHERE uuid = '%q' AND system = '%q'", cbt.member_uuid, cbt.member_system);
|
||||||
|
cc_execute_sql(NULL, sql, NULL);
|
||||||
|
switch_safe_free(sql);
|
||||||
goto end;
|
goto end;
|
||||||
} else {
|
} else {
|
||||||
queue_name = strdup(queue->name);
|
queue_name = strdup(queue->name);
|
||||||
|
|
Loading…
Reference in New Issue