[asterisk-commits] russell: trunk r131643 - /trunk/channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 17 09:46:30 CDT 2008


Author: russell
Date: Thu Jul 17 09:46:29 2008
New Revision: 131643

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131643
Log:
Instead of attempting to pass through AST_EVENT_DEVICE_STATE, use DEVICE_STATE_CHANGE
instead.  DEVICE_STATE is a state change on one server, and DEVICE_STATE_CHANGE is
the "real" state of that device across all servers sharing state.  This would have
only been a problem with distributed device state.

Modified:
    trunk/channels/chan_agent.c

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=131643&r1=131642&r2=131643
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Thu Jul 17 09:46:29 2008
@@ -2488,7 +2488,8 @@
 	/* Dialplan Functions */
 	ast_custom_function_register(&agent_function);
 
-	agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, agent_devicestate_cb, NULL, AST_EVENT_IE_END);
+	agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE,
+		agent_devicestate_cb, NULL, AST_EVENT_IE_END);
 
 	return AST_MODULE_LOAD_SUCCESS;
 }




More information about the asterisk-commits mailing list