[asterisk-commits] dlee: branch dlee/stasis-app r383605 - in /team/dlee/stasis-app: apps/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 22 13:02:54 CDT 2013


Author: dlee
Date: Fri Mar 22 13:02:50 2013
New Revision: 383605

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383605
Log:
Addressed review feedback.

 * Added some NULL checks
 * Removed unnecessary log statement

Modified:
    team/dlee/stasis-app/apps/app_stasis.c
    team/dlee/stasis-app/res/res_stasis_websocket.c

Modified: team/dlee/stasis-app/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/apps/app_stasis.c?view=diff&rev=383605&r1=383604&r2=383605
==============================================================================
--- team/dlee/stasis-app/apps/app_stasis.c (original)
+++ team/dlee/stasis-app/apps/app_stasis.c Fri Mar 22 13:02:50 2013
@@ -312,6 +312,9 @@
 		return -1;
 	}
 	msg = stasis_app_event_create("stasis-end", snapshot, NULL);
+	if (!msg) {
+		return -1;
+	}
 
 	app_send(app, msg);
 	return 0;
@@ -325,6 +328,9 @@
 		struct ast_channel_snapshot *snapshot = stasis_message_data(message);
 
 		msg = stasis_app_event_create("channel-state-change", snapshot, NULL);
+		if (!msg) {
+			return;
+		}
 		app_send(app, msg);
 	}
 	if (stasis_subscription_final_message(sub, message)) {

Modified: team/dlee/stasis-app/res/res_stasis_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/res/res_stasis_websocket.c?view=diff&rev=383605&r1=383604&r2=383605
==============================================================================
--- team/dlee/stasis-app/res/res_stasis_websocket.c (original)
+++ team/dlee/stasis-app/res/res_stasis_websocket.c Fri Mar 22 13:02:50 2013
@@ -253,9 +253,6 @@
 						     "line", err.line,
 						     "column", err.column,
 						     "request", payloadz ? payloadz : "(null)");
-				if (!resp) {
-					ast_log(LOG_ERROR, "Error building error message. That's just messed up.\n");
-				}
 			} else {
 				resp = websocket_process_req(&stasis_session, req);
 			}




More information about the asterisk-commits mailing list