[asterisk-commits] rmudgett: branch rmudgett/stasis_cache r408998 - /team/rmudgett/stasis_cache/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 26 19:29:46 CST 2014


Author: rmudgett
Date: Wed Feb 26 19:29:40 2014
New Revision: 408998

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=408998
Log:
Resolve MWI stasis event cache concerns about eid.

Modified:
    team/rmudgett/stasis_cache/main/app.c

Modified: team/rmudgett/stasis_cache/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/stasis_cache/main/app.c?view=diff&rev=408998&r1=408997&r2=408998
==============================================================================
--- team/rmudgett/stasis_cache/main/app.c (original)
+++ team/rmudgett/stasis_cache/main/app.c Wed Feb 26 19:29:40 2014
@@ -2821,8 +2821,6 @@
 	return mwi_state;
 }
 
-/* BUGBUG mwi_state consumers need to be updated to deal with the cache eid separation for aggregated state. */
-/* BUGBUG mwi_state needs to be treated just like device state.  It has an aggregate for multiple eid sources. */
 int ast_publish_mwi_state_full(
 			const char *mailbox,
 			const char *context,
@@ -2861,7 +2859,13 @@
 		mwi_state->eid = ast_eid_default;
 	}
 
-	message = stasis_message_create_full(ast_mwi_state_type(), mwi_state, &mwi_state->eid);
+	/*
+	 * As far as stasis is concerned, all MWI events are internal.
+	 *
+	 * We may in the future want to make MWI aggregate internal/external
+	 * message counts similar to how device state aggregates state.
+	 */
+	message = stasis_message_create_full(ast_mwi_state_type(), mwi_state, &ast_eid_default);
 	if (!message) {
 		return -1;
 	}
@@ -2915,7 +2919,8 @@
 	ao2_ref(obj->mwi_state, +1);
 	obj->blob = ast_json_ref(blob);
 
-	msg = stasis_message_create_full(message_type, obj, &mwi_state->eid);
+	/* This is not a normal MWI event.  Only used by the MinivmNotify app. */
+	msg = stasis_message_create(message_type, obj);
 	if (!msg) {
 		return NULL;
 	}




More information about the asterisk-commits mailing list