[asterisk-commits] dlee: trunk r402277 - in /trunk: ./ res/stasis/app.c

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


Author: dlee
Date: Thu Oct 31 09:45:03 2013
New Revision: 402277

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402277
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.
........

Merged revisions 402276 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/stasis/app.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/stasis/app.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis/app.c?view=diff&rev=402277&r1=402276&r2=402277
==============================================================================
--- trunk/res/stasis/app.c (original)
+++ trunk/res/stasis/app.c Thu Oct 31 09:45:03 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