[asterisk-commits] kmoore: branch kmoore/stasis-channel_events-take2 r384826 - in /team/kmoore/s...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 5 15:00:11 CDT 2013
Author: kmoore
Date: Fri Apr 5 15:00:07 2013
New Revision: 384826
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384826
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
........
Merged revisions 384823 from http://svn.asterisk.org/svn/asterisk/team/dlee/stasis-app
Modified:
team/kmoore/stasis-channel_events-take2/ (props changed)
team/kmoore/stasis-channel_events-take2/res/res_stasis_websocket.c
Propchange: team/kmoore/stasis-channel_events-take2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Apr 5 15:00:07 2013
@@ -1,1 +1,1 @@
-/team/dlee/stasis-app:1-384819
+/team/dlee/stasis-app:1-384825
Modified: team/kmoore/stasis-channel_events-take2/res/res_stasis_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/res/res_stasis_websocket.c?view=diff&rev=384826&r1=384825&r2=384826
==============================================================================
--- team/kmoore/stasis-channel_events-take2/res/res_stasis_websocket.c (original)
+++ team/kmoore/stasis-channel_events-take2/res/res_stasis_websocket.c Fri Apr 5 15:00:07 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