[asterisk-commits] dlee: branch dlee/stasis-app r384823 - /team/dlee/stasis-app/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 5 14:41:44 CDT 2013
Author: dlee
Date: Fri Apr 5 14:41:40 2013
New Revision: 384823
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384823
Log:
More review findings.
* Removed unneeded CMP_STOP from container compare function
* Updated comments
* Explained why the explicit shutdown is needed for stasis_ws_session_info
Modified:
team/dlee/stasis-app/res/res_stasis_websocket.c
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=384823&r1=384822&r2=384823
==============================================================================
--- team/dlee/stasis-app/res/res_stasis_websocket.c (original)
+++ team/dlee/stasis-app/res/res_stasis_websocket.c Fri Apr 5 14:41:40 2013
@@ -95,7 +95,7 @@
const char *rhs_name = flags & OBJ_KEY ? rhs : rhs_app->name;
if (strcmp(lhs_app->name, rhs_name) == 0) {
- return CMP_MATCH | CMP_STOP;
+ return CMP_MATCH;
} else {
return 0;
}
@@ -116,7 +116,7 @@
{
struct stasis_ws_session_info *session = obj;
- /* session_unregister_all should have been called before */
+ /* session_shutdown should have been called before */
ast_assert(session->ws_session == NULL);
ast_assert(session->websocket_apps == NULL);
}
@@ -142,6 +142,11 @@
/*!
* \brief Explicitly shutdown a session.
+ *
+ * An explicit shutdown is necessary, since stasis-app has a reference to this
+ * session. We also need to be sure to null out the \c ws_session field, since
+ * the websocket is about to go away.
+ *
* \param session Session info struct.
*/
static void session_shutdown(struct stasis_ws_session_info *session)
More information about the asterisk-commits
mailing list