Fixed compile errors introduced in r395954.
authorDavid M. Lee <dlee@digium.com>
Thu, 1 Aug 2013 15:31:03 +0000 (15:31 +0000)
committerDavid M. Lee <dlee@digium.com>
Thu, 1 Aug 2013 15:31:03 +0000 (15:31 +0000)
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

channels/chan_pjsip.c
res/res_pjsip_mwi.c

index 2e715e9..a9549ff 100644 (file)
@@ -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;
                }
index b1f696a..faf0a07 100644 (file)
@@ -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;
        }