]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix timeouts for ast_waitfordigit[_full].
authorDavid M. Lee <dlee@digium.com>
Thu, 13 Sep 2012 18:39:40 +0000 (18:39 +0000)
committerDavid M. Lee <dlee@digium.com>
Thu, 13 Sep 2012 18:39:40 +0000 (18:39 +0000)
commit5cf7e22c0824bdc3bec8cc5ab800bb291f9b6788
tree6db5c8e6e606a3d2dd975550ef317d87aa356d8f
parente461247cefdd8ff227acd0e1e1455747fd3c68ec
Fix timeouts for ast_waitfordigit[_full].

ast_waitfordigit_full would simply pass its timeout to ast_waitfor_nandfds,
expecting it to decrement the timeout by however many milliseconds were
waited. This is a problem if it consistently waits less than 1ms. The timeout
will never be decremented, and we wait... FOREVER!

This patch makes ast_waitfordigit_full manage the timeout itself. It maintains
the previously undocumented behavior that negative timeouts wait forever.

(closes issue ASTERISK-20375)
Reported by: Mark Michelson
Tested by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2109/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@373024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/channel.h
main/channel.c