[asterisk-commits] kmoore: branch kmoore/stasis-mwi r382320 - in /team/kmoore/stasis-mwi: channe...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 28 21:11:36 CST 2013


Author: kmoore
Date: Thu Feb 28 21:11:31 2013
New Revision: 382320

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382320
Log:
Make sure to check message types

Modified:
    team/kmoore/stasis-mwi/channels/chan_sip.c
    team/kmoore/stasis-mwi/channels/chan_skinny.c
    team/kmoore/stasis-mwi/channels/sig_pri.c
    team/kmoore/stasis-mwi/res/res_jabber.c
    team/kmoore/stasis-mwi/res/res_xmpp.c

Modified: team/kmoore/stasis-mwi/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/channels/chan_sip.c?view=diff&rev=382320&r1=382319&r2=382320
==============================================================================
--- team/kmoore/stasis-mwi/channels/chan_sip.c (original)
+++ team/kmoore/stasis-mwi/channels/chan_sip.c Thu Feb 28 21:11:31 2013
@@ -16507,8 +16507,9 @@
 static void mwi_event_cb(void *userdata, struct stasis_topic *topic, struct stasis_message *msg)
 {
 	struct sip_peer *peer = userdata;
-
-	sip_send_mwi_to_peer(peer, 0);
+	if (stasis_mwi_message_type() != stasis_message_type(msg)) {
+		sip_send_mwi_to_peer(peer, 0);
+	}
 }
 
 static void network_change_event_subscribe(void)

Modified: team/kmoore/stasis-mwi/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/channels/chan_skinny.c?view=diff&rev=382320&r1=382319&r2=382320
==============================================================================
--- team/kmoore/stasis-mwi/channels/chan_skinny.c (original)
+++ team/kmoore/stasis-mwi/channels/chan_skinny.c Thu Feb 28 21:11:31 2013
@@ -3342,7 +3342,7 @@
 		return;
 	}
 
-	if (msg) {
+	if (msg && stasis_mwi_message_type() == stasis_message_type(msg)) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(msg);
 		l->newmsgs = mwi_state->new_msgs;
 	}

Modified: team/kmoore/stasis-mwi/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/channels/sig_pri.c?view=diff&rev=382320&r1=382319&r2=382320
==============================================================================
--- team/kmoore/stasis-mwi/channels/sig_pri.c (original)
+++ team/kmoore/stasis-mwi/channels/sig_pri.c Thu Feb 28 21:11:31 2013
@@ -8761,7 +8761,7 @@
 	int idx;
 	struct stasis_mwi_state *mwi_state;
 
-	if (!msg) {
+	if (stasis_mwi_message_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: team/kmoore/stasis-mwi/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/res/res_jabber.c?view=diff&rev=382320&r1=382319&r2=382320
==============================================================================
--- team/kmoore/stasis-mwi/res/res_jabber.c (original)
+++ team/kmoore/stasis-mwi/res/res_jabber.c Thu Feb 28 21:11:31 2013
@@ -3249,6 +3249,10 @@
 	struct aji_client *client;
 	struct stasis_mwi_state *mwi_state;
 
+	if (stasis_mwi_message_type() != stasis_message_type(msg)) {
+		return;
+	}
+
 	if (ast_eid_cmp(&ast_eid_default, stasis_message_eid(msg)))
 	{
 		/* If the event didn't originate from this server, don't send it back out. */

Modified: team/kmoore/stasis-mwi/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/res/res_xmpp.c?view=diff&rev=382320&r1=382319&r2=382320
==============================================================================
--- team/kmoore/stasis-mwi/res/res_xmpp.c (original)
+++ team/kmoore/stasis-mwi/res/res_xmpp.c Thu Feb 28 21:11:31 2013
@@ -1326,6 +1326,10 @@
 	char oldmsgs[10], newmsgs[10];
 	struct stasis_mwi_state *mwi_state;
 
+	if (stasis_mwi_message_type() != stasis_message_type(msg)) {
+		return;
+	}
+
 	if (ast_eid_cmp(&ast_eid_default, stasis_message_eid(msg))) {
 		/* If the event didn't originate from this server, don't send it back out. */
 		ast_debug(1, "Returning here\n");




More information about the asterisk-commits mailing list