[Asterisk-cvs] asterisk/channels chan_zap.c,1.337,1.338

markster at lists.digium.com markster at lists.digium.com
Sat Sep 11 09:35:41 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv20514/channels

Modified Files:
	chan_zap.c 
Log Message:
Don't set guardtime if channel is only reserved (bug #2421)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.337
retrieving revision 1.338
diff -u -d -r1.337 -r1.338
--- chan_zap.c	10 Sep 2004 18:58:05 -0000	1.337
+++ chan_zap.c	11 Sep 2004 13:37:36 -0000	1.338
@@ -2158,9 +2158,12 @@
 		case SIG_FXSGS:
 		case SIG_FXSLS:
 		case SIG_FXSKS:
-			/* Make sure we're not made available for at least two seconds */
-			time(&p->guardtime);
-			p->guardtime += 2;
+			/* Make sure we're not made available for at least two seconds assuming
+			   we were actually used for an inbound or outbound call. */
+			if (ast->_state != AST_STATE_RESERVED) {
+				time(&p->guardtime);
+				p->guardtime += 2;
+			}
 			break;
 		default:
 			tone_zone_play_tone(p->subs[SUB_REAL].zfd, -1);




More information about the svn-commits mailing list