[asterisk-commits] dlee: branch dlee/allow-multiple r395411 - /team/dlee/allow-multiple/res/stas...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 25 11:00:08 CDT 2013


Author: dlee
Date: Thu Jul 25 11:00:06 2013
New Revision: 395411

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395411
Log:
Account for double commas

Modified:
    team/dlee/allow-multiple/res/stasis_http/resource_events.c

Modified: team/dlee/allow-multiple/res/stasis_http/resource_events.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/allow-multiple/res/stasis_http/resource_events.c?view=diff&rev=395411&r1=395410&r2=395411
==============================================================================
--- team/dlee/allow-multiple/res/stasis_http/resource_events.c (original)
+++ team/dlee/allow-multiple/res/stasis_http/resource_events.c Thu Jul 25 11:00:06 2013
@@ -171,7 +171,15 @@
 		return;
 	}
 
-	if (!args->app) {
+	res = 0;
+	for (i = 0; i < args->app_count; ++i) {
+		if (ast_strlen_zero(args->app[i])) {
+			continue;
+		}
+		res |= session_register_app(session, args->app[i]);
+	}
+
+	if (ao2_container_count(session->websocket_apps) == 0) {
 		RAII_VAR(struct ast_json *, msg, NULL, ast_json_unref);
 
 		msg = ast_json_pack("{s: s, s: [s]}",
@@ -185,11 +193,6 @@
 		return;
 	}
 
-	res = 0;
-	for (i = 0; i < args->app_count; ++i) {
-		res |= session_register_app(session, args->app[i]);
-	}
-
 	if (res != 0) {
 		ari_websocket_session_write(ws_session, ari_oom_json());
 		return;




More information about the asterisk-commits mailing list