[asterisk-commits] russell: trunk r176557 - in /trunk: apps/app_queue.c main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 17 11:33:38 CST 2009
Author: russell
Date: Tue Feb 17 11:33:38 2009
New Revision: 176557
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176557
Log:
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
Modified:
trunk/apps/app_queue.c
trunk/main/pbx.c
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=176557&r1=176556&r2=176557
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Feb 17 11:33:38 2009
@@ -7095,7 +7095,7 @@
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;
}
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=176557&r1=176556&r2=176557
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Feb 17 11:33:38 2009
@@ -9102,7 +9102,7 @@
/* 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;
}
More information about the asterisk-commits
mailing list