mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
Remove unnecessary waits from stasis.
Since caches are updated on publisher threads, there is no need to wait for the cache updates to occur after a stasis message is published. In the case of chan_pjsip device state changes, this set of changes caused an improvement to performance. Review: https://reviewboard.asterisk.org/r/2890 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -187,7 +187,7 @@ void ast_endpoint_blob_publish(struct ast_endpoint *endpoint, struct stasis_mess
|
||||
}
|
||||
|
||||
struct ast_endpoint_snapshot *ast_endpoint_latest_snapshot(const char *tech,
|
||||
const char *name, unsigned int guaranteed)
|
||||
const char *name)
|
||||
{
|
||||
RAII_VAR(char *, id, NULL, ast_free);
|
||||
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
|
||||
@@ -198,10 +198,6 @@ struct ast_endpoint_snapshot *ast_endpoint_latest_snapshot(const char *tech,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (guaranteed) {
|
||||
stasis_topic_wait(ast_endpoint_topic_all_cached());
|
||||
}
|
||||
|
||||
msg = stasis_cache_get(ast_endpoint_cache(),
|
||||
ast_endpoint_snapshot_type(), id);
|
||||
if (!msg) {
|
||||
|
||||
Reference in New Issue
Block a user