[asterisk-commits] kmoore: branch kmoore/stasis-mwi r382382 - /team/kmoore/stasis-mwi/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 4 12:12:54 CST 2013


Author: kmoore
Date: Mon Mar  4 12:12:50 2013
New Revision: 382382

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382382
Log:
Make pollmailboxes actually work

Modified:
    team/kmoore/stasis-mwi/apps/app_voicemail.c

Modified: team/kmoore/stasis-mwi/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/apps/app_voicemail.c?view=diff&rev=382382&r1=382381&r2=382382
==============================================================================
--- team/kmoore/stasis-mwi/apps/app_voicemail.c (original)
+++ team/kmoore/stasis-mwi/apps/app_voicemail.c Mon Mar  4 12:12:50 2013
@@ -12610,7 +12610,7 @@
 static void mwi_sub_event_cb(struct stasis_subscription_change *change)
 {
 	struct mwi_sub_task *mwist;
-	char *context = ast_strdupa(change->uniqueid);
+	char *context = ast_strdupa(stasis_topic_name(change->topic));
 	char *mailbox;
 	
 	if ((mwist = ast_calloc(1, (sizeof(*mwist)))) == NULL) {
@@ -12638,6 +12638,10 @@
 	}
 
 	change = stasis_message_data(msg);
+	if (change->topic == stasis_mwi_topic_all()) {
+		return;
+	}
+
 	if (!strcmp(change->description, "Subscribe")) {
 		mwi_sub_event_cb(change);
 	} else if (!strcmp(change->description, "Unsubscribe")) {
@@ -12647,7 +12651,7 @@
 
 static int dump_cache(void *obj, void *arg, int flags)
 {
-	struct stasis_message *msg = arg;
+	struct stasis_message *msg = obj;
 	mwi_event_cb(NULL, NULL, msg);
 	return 0;
 }




More information about the asterisk-commits mailing list