[asterisk-commits] kmoore: branch kmoore/stasis-mwi r382384 - /team/kmoore/stasis-mwi/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 4 13:43:23 CST 2013


Author: kmoore
Date: Mon Mar  4 13:43:20 2013
New Revision: 382384

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382384
Log:
Make sure chan_mgcp compiles

Modified:
    team/kmoore/stasis-mwi/channels/chan_mgcp.c

Modified: team/kmoore/stasis-mwi/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/channels/chan_mgcp.c?view=diff&rev=382384&r1=382383&r2=382384
==============================================================================
--- team/kmoore/stasis-mwi/channels/chan_mgcp.c (original)
+++ team/kmoore/stasis-mwi/channels/chan_mgcp.c Mon Mar  4 13:43:20 2013
@@ -82,6 +82,7 @@
 #include "asterisk/event.h"
 #include "asterisk/chanvars.h"
 #include "asterisk/pktccops.h"
+#include "asterisk/stasis.h"
 
 /*
  * Define to work around buggy dlink MGCP phone firmware which
@@ -483,7 +484,7 @@
 	.func_channel_read = acf_channel_read,
 };
 
-static void mwi_event_cb(const struct ast_event *event, void *userdata)
+static void mwi_event_cb(void *userdata, struct stasis_topic *topic, struct stasis_message *msg)
 {
 	/* This module does not handle MWI in an event-based manner.  However, it
 	 * subscribes to MWI for each mailbox that is configured so that the core
@@ -506,10 +507,10 @@
 
 	ast_str_set(&uniqueid, 0, "%s@%s", mbox, cntx);
 
-	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_message_type(), ast_str_buffer(uniqueid));
-
-	if (event) {
-		struct stasis_mwi_state = stasis_message_data(msg);
+	msg = stasis_cache_get(stasis_mwi_topic_cached(), stasis_mwi_state(), ast_str_buffer(uniqueid));
+
+	if (msg) {
+		struct stasis_mwi_state *mwi_state = stasis_message_data(msg);
 		new_msgs = mwi_state->new_msgs;
 	} else {
 		new_msgs = ast_app_has_voicemail(p->mailbox, NULL);
@@ -4518,7 +4519,7 @@
 	}
 
 	if (e->mwi_event_sub) {
-		stasis_unsunscribe(e->mwi_event_sub);
+		stasis_unsubscribe(e->mwi_event_sub);
 	}
 
 	if (e->chanvars) {




More information about the asterisk-commits mailing list