mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
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
This commit is contained in:
@@ -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);
|
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;
|
enum ast_device_state state = AST_DEVICE_UNKNOWN;
|
||||||
RAII_VAR(struct ast_endpoint_snapshot *, endpoint_snapshot, NULL, ao2_cleanup);
|
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;
|
struct ast_devstate_aggregate aggregate;
|
||||||
int num, inuse = 0;
|
int num, inuse = 0;
|
||||||
|
|
||||||
@@ -894,19 +894,22 @@ static int chan_pjsip_devicestate(const char *data)
|
|||||||
state = AST_DEVICE_NOT_INUSE;
|
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;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_devstate_aggregate_init(&aggregate);
|
ast_devstate_aggregate_init(&aggregate);
|
||||||
|
|
||||||
ao2_ref(caching_topic, +1);
|
ao2_ref(cache, +1);
|
||||||
|
|
||||||
for (num = 0; num < endpoint_snapshot->num_channels; num++) {
|
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(),
|
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
|
||||||
endpoint_snapshot->channel_ids[num], 1), ao2_cleanup);
|
|
||||||
struct ast_channel_snapshot *snapshot;
|
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) {
|
if (!msg) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -239,7 +239,7 @@ static int get_message_count(void *obj, void *arg, int flags)
|
|||||||
struct message_accumulator *counter = arg;
|
struct message_accumulator *counter = arg;
|
||||||
struct ast_mwi_state *mwi_state;
|
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) {
|
if (!msg) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user