[asterisk-commits] mmichelson: trunk r136635 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 7 14:58:32 CDT 2008


Author: mmichelson
Date: Thu Aug  7 14:58:32 2008
New Revision: 136635

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136635
Log:
Don't allow Answer() to accept a negative argument.
Negative argument means an infinite delay and we
don't want that.


Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=136635&r1=136634&r2=136635
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Aug  7 14:58:32 2008
@@ -7655,6 +7655,10 @@
 	if ((chan->_state != AST_STATE_UP) && !ast_strlen_zero(data))
 		delay = atoi(data);
 
+	if (delay < 0) {
+		delay = 0;
+	}
+
 	return __ast_answer(chan, delay);
 }
 




More information about the asterisk-commits mailing list