mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 02:18:15 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@136636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user