[asterisk-commits] dlee: branch 12 r402276 - /branches/12/res/stasis/app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 31 09:43:49 CDT 2013


Author: dlee
Date: Thu Oct 31 09:43:44 2013
New Revision: 402276

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402276
Log:
stasis: add functions embarrassingly missing from r400522

I neglected to implement two of the endpoint subscription functions when
I did the work. Normally, you'll only hit that when you unsubscribe from
a specific endpoint.

Modified:
    branches/12/res/stasis/app.c

Modified: branches/12/res/stasis/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/stasis/app.c?view=diff&rev=402276&r1=402275&r2=402276
==============================================================================
--- branches/12/res/stasis/app.c (original)
+++ branches/12/res/stasis/app.c Thu Oct 31 09:43:44 2013
@@ -934,3 +934,19 @@
 		return 0;
 	}
 }
+
+int app_unsubscribe_endpoint_id(struct app *app, const char *endpoint_id)
+{
+	if (!app || !endpoint_id) {
+		return -1;
+	}
+
+	return unsubscribe(app, "endpoint", endpoint_id);
+}
+
+int app_is_subscribed_endpoint_id(struct app *app, const char *endpoint_id)
+{
+	RAII_VAR(struct app_forwards *, forwards, NULL, ao2_cleanup);
+	forwards = ao2_find(app->forwards, endpoint_id, OBJ_SEARCH_KEY);
+	return forwards != NULL;
+}




More information about the asterisk-commits mailing list