[svn-commits] branch 1.2 r34655 - /branches/1.2/pbx.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Jun 18 14:03:59 MST 2006


Author: russell
Date: Sun Jun 18 16:03:58 2006
New Revision: 34655

URL: http://svn.digium.com/view/asterisk?rev=34655&view=rev
Log:
don't set state to BUSY if the channel is already in the UP state
(issue #7376, backported from trunk)

Modified:
    branches/1.2/pbx.c

Modified: branches/1.2/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/pbx.c?rev=34655&r1=34654&r2=34655&view=diff
==============================================================================
--- branches/1.2/pbx.c (original)
+++ branches/1.2/pbx.c Sun Jun 18 16:03:58 2006
@@ -5432,7 +5432,8 @@
 static int pbx_builtin_busy(struct ast_channel *chan, void *data)
 {
 	ast_indicate(chan, AST_CONTROL_BUSY);		
-	ast_setstate(chan, AST_STATE_BUSY);
+	if (chan->_state != AST_STATE_UP)
+		ast_setstate(chan, AST_STATE_BUSY);
 	wait_for_hangup(chan, data);
 	return -1;
 }
@@ -5443,7 +5444,8 @@
 static int pbx_builtin_congestion(struct ast_channel *chan, void *data)
 {
 	ast_indicate(chan, AST_CONTROL_CONGESTION);
-	ast_setstate(chan, AST_STATE_BUSY);
+	if (chan->_state != AST_STATE_UP)
+		ast_setstate(chan, AST_STATE_BUSY);
 	wait_for_hangup(chan, data);
 	return -1;
 }



More information about the svn-commits mailing list