[asterisk-commits] kmoore: trunk r384219 - in /trunk: channels/ include/asterisk/ main/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 27 17:42:10 CDT 2013


Author: kmoore
Date: Wed Mar 27 17:42:06 2013
New Revision: 384219

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384219
Log:
Convert MWI state message type to the new stasis naming convention

Modified:
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/sig_pri.c
    trunk/include/asterisk/app.h
    trunk/main/app.c
    trunk/res/res_jabber.c
    trunk/res/res_xmpp.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Mar 27 17:42:06 2013
@@ -5414,7 +5414,7 @@
 	}
 
 	ast_str_set(&uniqueid, 0, "%s@%s", mailbox, context);
-	mwi_message = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+	mwi_message = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 
 	if (mwi_message) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(mwi_message);

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Mar 27 17:42:06 2013
@@ -8755,7 +8755,7 @@
 			}
 
 			ast_str_set(&uniqueid, 0, "%s@%s", mailbox, context);
-			msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+			msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 
 			if (msg) {
 				struct stasis_mwi_state *mwi_state = stasis_message_data(msg);

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Wed Mar 27 17:42:06 2013
@@ -507,7 +507,7 @@
 
 	ast_str_set(&uniqueid, 0, "%s@%s", mbox, cntx);
 
-	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 
 	if (msg) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(msg);

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 27 17:42:06 2013
@@ -16668,7 +16668,7 @@
 		ao2_cleanup(peer);
 		return;
 	}
-	if (stasis_mwi_state_message() == stasis_message_type(msg)) {
+	if (stasis_mwi_state_type() == stasis_message_type(msg)) {
 		sip_send_mwi_to_peer(peer, 0);
 	}
 }
@@ -28849,7 +28849,7 @@
 		ast_str_reset(uniqueid);
 		ast_str_set(&uniqueid, 0, "%s@%s", mailbox->mailbox, S_OR(mailbox->context, "default"));
 
-		msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+		msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 		if (!msg) {
 			continue;
 		}

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Wed Mar 27 17:42:06 2013
@@ -3518,7 +3518,7 @@
 		return;
 	}
 
-	if (msg && stasis_mwi_state_message() == stasis_message_type(msg)) {
+	if (msg && stasis_mwi_state_type() == stasis_message_type(msg)) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(msg);
 		l->newmsgs = mwi_state->new_msgs;
 	}

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Wed Mar 27 17:42:06 2013
@@ -5513,7 +5513,7 @@
 
 	ast_str_set(&uniqueid, 0, "%s@%s", mailbox, context);
 
-	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 
 	if (msg) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(msg);

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Wed Mar 27 17:42:06 2013
@@ -8768,7 +8768,7 @@
 	int idx;
 	struct stasis_mwi_state *mwi_state;
 
-	if (stasis_mwi_state_message() != stasis_message_type(msg)) {
+	if (stasis_mwi_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 
@@ -8826,7 +8826,7 @@
 		ast_str_reset(uniqueid);
 		ast_str_set(&uniqueid, 0, "%s@%s", pri->mbox[idx].number, pri->mbox[idx].context);
 
-		msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_message(), ast_str_buffer(uniqueid));
+		msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state_type(), ast_str_buffer(uniqueid));
 		if (!msg) {
 			/* No cached event for this mailbox. */
 			continue;

Modified: trunk/include/asterisk/app.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/app.h?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/include/asterisk/app.h (original)
+++ trunk/include/asterisk/app.h Wed Mar 27 17:42:06 2013
@@ -1170,7 +1170,7 @@
  * \retval NULL if it has not been allocated
  * \since 12
  */
-struct stasis_message_type *stasis_mwi_state_message(void);
+struct stasis_message_type *stasis_mwi_state_type(void);
 
 /*! @} */
 

Modified: trunk/main/app.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/app.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Wed Mar 27 17:42:06 2013
@@ -84,7 +84,7 @@
 
 static struct stasis_topic *mwi_topic_all;
 static struct stasis_caching_topic *mwi_topic_cached;
-static struct stasis_message_type *mwi_message_type;
+static struct stasis_message_type *mwi_state_type;
 static struct stasis_topic_pool *mwi_topic_pool;
 
 static void *shaun_of_the_dead(void *data)
@@ -2659,9 +2659,9 @@
 	return mwi_topic_cached;
 }
 
-struct stasis_message_type *stasis_mwi_state_message(void)
-{
-	return mwi_message_type;
+struct stasis_message_type *stasis_mwi_state_type(void)
+{
+	return mwi_state_type;
 }
 
 struct stasis_topic *stasis_mwi_topic(const char *uniqueid)
@@ -2702,7 +2702,7 @@
 		ast_set_default_eid(&mwi_state->eid);
 	}
 
-	message = stasis_message_create(stasis_mwi_state_message(), mwi_state);
+	message = stasis_message_create(stasis_mwi_state_type(), mwi_state);
 
 	mailbox_specific_topic = stasis_mwi_topic(ast_str_buffer(uniqueid));
 	if (!mailbox_specific_topic) {
@@ -2716,7 +2716,7 @@
 
 static const char *mwi_state_get_id(struct stasis_message *message)
 {
-	if (stasis_mwi_state_message() == stasis_message_type(message)) {
+	if (stasis_mwi_state_type() == stasis_message_type(message)) {
 		struct stasis_mwi_state *mwi_state = stasis_message_data(message);
 		return mwi_state->uniqueid;
 	} else if (stasis_subscription_change() == stasis_message_type(message)) {
@@ -2732,8 +2732,8 @@
 	ao2_cleanup(mwi_topic_all);
 	mwi_topic_all = NULL;
 	mwi_topic_cached = stasis_caching_unsubscribe(mwi_topic_cached);
-	ao2_cleanup(mwi_message_type);
-	mwi_message_type = NULL;
+	ao2_cleanup(mwi_state_type);
+	mwi_state_type = NULL;
 	ao2_cleanup(mwi_topic_pool);
 	mwi_topic_pool = NULL;
 }
@@ -2748,8 +2748,8 @@
 	if (!mwi_topic_cached) {
 		return -1;
 	}
-	mwi_message_type = stasis_message_type_create("stasis_mwi_state");
-	if (!mwi_message_type) {
+	mwi_state_type = stasis_message_type_create("stasis_mwi_state");
+	if (!mwi_state_type) {
 		return -1;
 	}
 	mwi_topic_pool = stasis_topic_pool_create(mwi_topic_all);

Modified: trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_jabber.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Wed Mar 27 17:42:06 2013
@@ -3249,7 +3249,7 @@
 	struct aji_client *client = data;
 	struct stasis_mwi_state *mwi_state;
 
-	if (!stasis_subscription_is_subscribed(sub) || stasis_mwi_state_message() != stasis_message_type(msg)) {
+	if (!stasis_subscription_is_subscribed(sub) || stasis_mwi_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: trunk/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_xmpp.c?view=diff&rev=384219&r1=384218&r2=384219
==============================================================================
--- trunk/res/res_xmpp.c (original)
+++ trunk/res/res_xmpp.c Wed Mar 27 17:42:06 2013
@@ -1326,7 +1326,7 @@
 	char oldmsgs[10], newmsgs[10];
 	struct stasis_mwi_state *mwi_state;
 
-	if (!stasis_subscription_is_subscribed(sub) || stasis_mwi_state_message() != stasis_message_type(msg)) {
+	if (!stasis_subscription_is_subscribed(sub) || stasis_mwi_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 




More information about the asterisk-commits mailing list