summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2009-02-17 17:33:38 +0000
committerRussell Bryant <russell@russellbryant.com>2009-02-17 17:33:38 +0000
commit184872fdfd033d29bcf2d99d688d7b046dfdc778 (patch)
tree1b3c52f66e2804b7f5e68f62f661354dbbd3fc2a /main/pbx.c
parent176f3801058fa5ec6f26fa8fbf84a1f72c11e22b (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: https://origsvn.digium.com/svn/asterisk/trunk@176557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 96e42db45..4c2b27366 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -9102,7 +9102,7 @@ int load_pbx(void)
/* Register manager application */
ast_manager_register2("ShowDialPlan", EVENT_FLAG_CONFIG | EVENT_FLAG_REPORTING, manager_show_dialplan, "List dialplan", mandescr_show_dialplan);
- if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE, device_state_cb, NULL,
+ if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, NULL,
AST_EVENT_IE_END))) {
return -1;
}