diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-17 17:33:38 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-17 17:33:38 +0000 |
commit | b6cc1075c4240cd88772c6975a5d811fce057269 (patch) | |
tree | 1b3c52f66e2804b7f5e68f62f661354dbbd3fc2a /apps/app_queue.c | |
parent | c76e573455455dce8b91090eeba6516ae1c10603 (diff) |
Fix a race condition that caused device states to become incorrect for hints.
The problem here is that the hint processing code was subscribed to the wrong
event type. So, it started processing state for a hint too soon, before the
device state cache had been updated.
Also, fix a similar bug in app_queue, as it was also subscribed to the wrong
event type.
(closes issue #14461)
Reported by: alecdavis
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176557 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 15472cdc5..58b68cda3 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -7095,7 +7095,7 @@ static int load_module(void) ast_log(LOG_WARNING, "devicestate taskprocessor reference failed - devicestate notifications will not occur\n"); } - if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE, device_state_cb, NULL, AST_EVENT_IE_END))) { + if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, NULL, AST_EVENT_IE_END))) { res = -1; } |