[asterisk-commits] mmichelson: branch mmichelson/pubsub_bodies r405892 - /team/mmichelson/pubsub...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 17 16:25:34 CST 2014
Author: mmichelson
Date: Fri Jan 17 16:25:30 2014
New Revision: 405892
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=405892
Log:
Only accept SUBSCRIBES if we have a *primary* body generator of the appropriate type.
Modified:
team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.c
Modified: team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.c?view=diff&rev=405892&r1=405891&r2=405892
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.c (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.c Fri Jan 17 16:25:30 2014
@@ -705,6 +705,15 @@
SCOPED_LOCK(lock, &body_generators, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK);
AST_LIST_TRAVERSE(&body_generators, iter, list) {
+ /* If we've reached the supplementary body generators and don't have a match,
+ * then there is no primary body generator match, which means we cannot
+ * handle the subscription
+ */
+ if (iter->generator_type ==
+ AST_SIP_PUBSUB_BODY_GENERATOR_SUPPLEMENTARY) {
+ iter = NULL;
+ break;
+ }
if (!strcmp(iter->type, content_type) &&
!strcmp(iter->subtype, content_subtype)) {
break;
More information about the asterisk-commits
mailing list