[asterisk-commits] murf: branch 1.2 r47274 - in /branches/1.2: channel.c include/asterisk/channel.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 7 11:22:02 MST 2006


Author: murf
Date: Tue Nov  7 12:22:01 2006
New Revision: 47274

URL: http://svn.digium.com/view/asterisk?rev=47274&view=rev
Log:
This mod for bug_7506, to make the manager code output the proper event

Modified:
    branches/1.2/channel.c
    branches/1.2/include/asterisk/channel.h

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=47274&r1=47273&r2=47274&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Tue Nov  7 12:22:01 2006
@@ -2590,6 +2590,7 @@
 				      c->cid.cid_num ? c->cid.cid_num : "<unknown>",
 				      c->cid.cid_name ? c->cid.cid_name : "<unknown>",
 				      c->uniqueid);
+			ast_set_flag(c, AST_FLAG_NOTNEW);
 		}
 		return c;
 	}
@@ -3253,7 +3254,7 @@
 	chan->_state = state;
 	ast_device_state_changed_literal(chan->name);
 	manager_event(EVENT_FLAG_CALL,
-		      (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
+		      (oldstate == AST_STATE_DOWN && !ast_test_flag(chan, AST_FLAG_NOTNEW)) ? "Newchannel" : "Newstate",
 		      "Channel: %s\r\n"
 		      "State: %s\r\n"
 		      "CallerID: %s\r\n"

Modified: branches/1.2/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/branches/1.2/include/asterisk/channel.h?rev=47274&r1=47273&r2=47274&view=diff
==============================================================================
--- branches/1.2/include/asterisk/channel.h (original)
+++ branches/1.2/include/asterisk/channel.h Tue Nov  7 12:22:01 2006
@@ -435,6 +435,7 @@
 						   so when ->priority is set, it will get incremented before
 						   finding the next priority to run
 						*/
+#define AST_FLAG_NOTNEW 	(1 << 10)	/*!< see bug:7855 incorrect Newchannel event generation */
 /* @} */
 
 #define AST_FEATURE_PLAY_WARNING	(1 << 0)



More information about the asterisk-commits mailing list