Project "FreeSWITCH Source" received a push.

branch: master updated

       via: 4371d3c804d890315ca623e2930286154d80a9a8 (commit)
       via: 2ad81ac82f3c3c989e4d7d11f788c43c2c6f20d8 (commit)
       via: 49a5effcdf2cea9e0ddcf146cf3fe85d1872e654 (commit)
      from: 231a7ffaa19886653705c217a73d8e25b705503c (commit)


= COMMIT LOG ===========================================================
committer: Leon de Rooij
comments: 
Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
committer: Anthony Minessale
comments: 
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:
committer: Marc Olivier Chouinard
comments: 
mod_callcenter: Add error response for queue load and queue reload (FS-2988)

diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c
index d1de632..61305bb 100644
--- a/src/mod/applications/mod_callcenter/mod_callcenter.c
+++ b/src/mod/applications/mod_callcenter/mod_callcenter.c
@@ -2625,8 +2625,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
 				cc_queue_t *queue = NULL;
 				if ((queue = get_queue(queue_name))) {
 					queue_rwunlock(queue);
+					stream->write_function(stream, "%s", "+OK\n");
+				} else {
+					stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
 				}
-				stream->write_function(stream, "%s", "+OK\n");
 			}
 		} else if (action && !strcasecmp(action, "unload")) {
 			if (argc-initial_argc < 1) {
@@ -2648,8 +2650,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
 				destroy_queue(queue_name, SWITCH_FALSE);
 				if ((queue = get_queue(queue_name))) {
 					queue_rwunlock(queue);
+					stream->write_function(stream, "%s", "+OK\n");
+				} else {
+					stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
 				}
-				stream->write_function(stream, "%s", "+OK\n");
 			}
 		} else if (action && !strcasecmp(action, "list")) {
 			if (argc-initial_argc < 1) {
@@ -2671,7 +2675,6 @@ SWITCH_STANDARD_API(cc_config_api_function)
 				goto done;
 			} else {
 				const char *queue_name = argv[0 + initial_argc];
-
 				struct list_result cbt;
 				cbt.row_process = 0;
 				cbt.stream = stream;
========================================================================

Summary of changes:
 .../applications/mod_callcenter/mod_callcenter.c   |    9 ++++++---
 src/switch_core_sqldb.c                            |   11 +++++------
 2 files changed, 11 insertions(+), 9 deletions(-)

this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630 --
FreeSWITCH Source