[asterisk-commits] russell: branch 1.2 r38982 - /branches/1.2/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Aug 5 02:01:39 MST 2006


Author: russell
Date: Sat Aug  5 04:01:37 2006
New Revision: 38982

URL: http://svn.digium.com/view/asterisk?rev=38982&view=rev
Log:
Always generate a Newstate event in ast_setstate() instead of making it a
Newchannel event if the state was AST_STATE_DOWN.  The Newchannel event will
always be generated in ast_request(), so this just causes a duplicated
Newchannel event in some cases.  
(issue #7506, repoted by capouch, fixed by me)

Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=38982&r1=38981&r2=38982&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Sat Aug  5 04:01:37 2006
@@ -3190,8 +3190,7 @@
 
 	chan->_state = state;
 	ast_device_state_changed_literal(chan->name);
-	manager_event(EVENT_FLAG_CALL,
-		      (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
+	manager_event(EVENT_FLAG_CALL, "Newstate",
 		      "Channel: %s\r\n"
 		      "State: %s\r\n"
 		      "CallerID: %s\r\n"



More information about the asterisk-commits mailing list