aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 19:58:32 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 19:58:32 +0000
commitaf03e5ed89416f8f0889442923ec8cb604d0cbcd (patch)
tree455d3047d517a1d4d47dc06cd39e12743e76b236 /main/pbx.c
parent0be40915ff59874c724904ec0621ce0f233abd2e (diff)
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/trunk@136635 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 3edea4e05..6968171f2 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7655,6 +7655,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);
}