summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-08-01 15:31:03 +0000
committerDavid M. Lee <dlee@digium.com>2013-08-01 15:31:03 +0000
commit88d6c366d161a113ab5ef39a89041e5260b2fc40 (patch)
treef38319473207a63345245102a91d7aefbec3cbbb
parente1b959ccbb4e47421b37a0f75a2bf89ccd34dcb1 (diff)
Fixed compile errors introduced in r395954.
Just a merge error due to a file rename. Grrr... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_pjsip.c13
-rw-r--r--res/res_pjsip_mwi.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 2e715e9ff..a9549ff31 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -877,7 +877,7 @@ static int chan_pjsip_devicestate(const char *data)
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,19 +894,22 @@ static int chan_pjsip_devicestate(const char *data)
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;
}
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index b1f696aae..faf0a07b6 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -239,7 +239,7 @@ static int get_message_count(void *obj, void *arg, int flags)
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;
}