[asterisk-commits] dlee: trunk r395971 - in /trunk: channels/chan_pjsip.c res/res_pjsip_mwi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 1 10:31:05 CDT 2013


Author: dlee
Date: Thu Aug  1 10:31:03 2013
New Revision: 395971

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395971
Log:
Fixed compile errors introduced in r395954.

Just a merge error due to a file rename. Grrr...

Modified:
    trunk/channels/chan_pjsip.c
    trunk/res/res_pjsip_mwi.c

Modified: trunk/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_pjsip.c?view=diff&rev=395971&r1=395970&r2=395971
==============================================================================
--- trunk/channels/chan_pjsip.c (original)
+++ trunk/channels/chan_pjsip.c Thu Aug  1 10:31:03 2013
@@ -877,7 +877,7 @@
 	RAII_VAR(struct ast_sip_endpoint *, endpoint, ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", data), ao2_cleanup);
 	enum ast_device_state state = AST_DEVICE_UNKNOWN;
 	RAII_VAR(struct ast_endpoint_snapshot *, endpoint_snapshot, NULL, ao2_cleanup);
-	RAII_VAR(struct stasis_caching_topic *, caching_topic, NULL, ao2_cleanup);
+	RAII_VAR(struct stasis_cache *, cache, NULL, ao2_cleanup);
 	struct ast_devstate_aggregate aggregate;
 	int num, inuse = 0;
 
@@ -894,18 +894,21 @@
 		state = AST_DEVICE_NOT_INUSE;
 	}
 
-	if (!endpoint_snapshot->num_channels || !(caching_topic = ast_channel_topic_all_cached())) {
+	if (!endpoint_snapshot->num_channels || !(cache = ast_channel_cache())) {
 		return state;
 	}
 
 	ast_devstate_aggregate_init(&aggregate);
 
-	ao2_ref(caching_topic, +1);
+	ao2_ref(cache, +1);
 
 	for (num = 0; num < endpoint_snapshot->num_channels; num++) {
-		RAII_VAR(struct stasis_message *, msg, stasis_cache_get_extended(caching_topic, ast_channel_snapshot_type(),
-			endpoint_snapshot->channel_ids[num], 1), ao2_cleanup);
+		RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
 		struct ast_channel_snapshot *snapshot;
+
+		stasis_topic_wait(ast_channel_topic_all_cached());
+		msg = stasis_cache_get(cache, ast_channel_snapshot_type(),
+			endpoint_snapshot->channel_ids[num]);
 
 		if (!msg) {
 			continue;

Modified: trunk/res/res_pjsip_mwi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_mwi.c?view=diff&rev=395971&r1=395970&r2=395971
==============================================================================
--- trunk/res/res_pjsip_mwi.c (original)
+++ trunk/res/res_pjsip_mwi.c Thu Aug  1 10:31:03 2013
@@ -239,7 +239,7 @@
 	struct message_accumulator *counter = arg;
 	struct ast_mwi_state *mwi_state;
 
-	msg = stasis_cache_get(ast_mwi_topic_cached(), ast_mwi_state_type(), mwi_stasis->mailbox);
+	msg = stasis_cache_get(ast_mwi_state_cache(), ast_mwi_state_type(), mwi_stasis->mailbox);
 	if (!msg) {
 		return 0;
 	}




More information about the asterisk-commits mailing list