[GIT]FreeSWITCH branch master updated. git2svn-syncpoint-master-1652-g2ad81ac
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "FreeSWITCH". The branch, master has been updated via 2ad81ac82f3c3c989e4d7d11f788c43c2c6f20d8 (commit) from 49a5effcdf2cea9e0ddcf146cf3fe85d1872e654 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2ad81ac82f3c3c989e4d7d11f788c43c2c6f20d8 Author: Anthony Minessale <anthm@freeswitch.org> Date: Sat Jan 29 13:43:59 2011 -0600 fix || where it should be or in sql stmt that may cause stray records in the calls table diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 4167b4a..35311c9 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -1160,15 +1160,14 @@ static void core_event_handler(switch_event_t *event) case SWITCH_EVENT_CHANNEL_DESTROY: { const char *uuid = switch_event_get_header(event, "unique-id"); - const char *sig = switch_event_get_header(event, "signal_bridge"); if (uuid) { new_sql() = switch_mprintf("delete from channels where uuid='%q' and hostname='%q'", uuid, switch_core_get_variable("hostname")); - if (switch_true(sig)) { - new_sql() = switch_mprintf("delete from calls where (caller_uuid='%q' || callee_uuid='%q') and hostname='%q'", - uuid, uuid, switch_core_get_variable("hostname")); - } + + new_sql() = switch_mprintf("delete from calls where (caller_uuid='%q' or callee_uuid='%q') and hostname='%q'", + uuid, uuid, switch_core_get_variable("hostname")); + } } break; @@ -1410,7 +1409,7 @@ static void core_event_handler(switch_event_t *event) } break; case SWITCH_EVENT_CHANNEL_UNBRIDGE: - new_sql() = switch_mprintf("delete from calls where caller_uuid='%s' and hostname='%q'", + new_sql() = switch_mprintf("delete from calls where (caller_uuid='%s' or callee_uuid='%q') and hostname='%q'", switch_event_get_header_nil(event, "caller-unique-id"), switch_core_get_variable("hostname")); break; case SWITCH_EVENT_SHUTDOWN: ----------------------------------------------------------------------- Summary of changes: src/switch_core_sqldb.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- FreeSWITCH
participants (1)
-
git@svn.freeswitch.org