[asterisk-commits] russell: branch 1.6.1 r176559 - in /branches/1.6.1: ./ apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 17 11:38:47 CST 2009


Author: russell
Date: Tue Feb 17 11:38:47 2009
New Revision: 176559

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176559
Log:
Merged revisions 176557 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r176557 | russell | 2009-02-17 11:33:38 -0600 (Tue, 17 Feb 2009) | 12 lines

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:
    branches/1.6.1/   (props changed)
    branches/1.6.1/apps/app_queue.c
    branches/1.6.1/main/pbx.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/apps/app_queue.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/apps/app_queue.c?view=diff&rev=176559&r1=176558&r2=176559
==============================================================================
--- branches/1.6.1/apps/app_queue.c (original)
+++ branches/1.6.1/apps/app_queue.c Tue Feb 17 11:38:47 2009
@@ -6689,7 +6689,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: branches/1.6.1/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/pbx.c?view=diff&rev=176559&r1=176558&r2=176559
==============================================================================
--- branches/1.6.1/main/pbx.c (original)
+++ branches/1.6.1/main/pbx.c Tue Feb 17 11:38:47 2009
@@ -8546,7 +8546,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