aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 19:59:00 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 19:59:00 +0000
commit18d444e93dbda34640bc5c3c74fcaa880b9d54af (patch)
tree63264bac0d8e274cc090f488eefbc606cc0c0974
parentf795addafa78a0e53d14ea11a6ffac7bad0754cd (diff)
Merged revisions 136635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r136635 | mmichelson | 2008-08-07 14:58:32 -0500 (Thu, 07 Aug 2008) | 5 lines Don't allow Answer() to accept a negative argument. Negative argument means an infinite delay and we don't want that. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@136636 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/pbx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 7aea5d2a7..9d5741feb 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7540,6 +7540,10 @@ static int pbx_builtin_answer(struct ast_channel *chan, void *data)
if ((chan->_state != AST_STATE_UP) && !ast_strlen_zero(data))
delay = atoi(data);
+ if (delay < 0) {
+ delay = 0;
+ }
+
return __ast_answer(chan, delay);
}