Fix timeouts for ast_waitfordigit[_full].
authorDavid M. Lee <dlee@digium.com>
Thu, 13 Sep 2012 20:02:56 +0000 (20:02 +0000)
committerDavid M. Lee <dlee@digium.com>
Thu, 13 Sep 2012 20:02:56 +0000 (20:02 +0000)
commit192e6a0f7aec9b006b4c24c9cd16cdb2ac96c16c
tree22d71840979f9b7287770e0caca4f5a3fc28d336
parentfb1d9a90a4e67c832486f35c54dab5b99ef62941
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/
........

Merged revisions 373024 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373025 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373029 from http://svn.asterisk.org/svn/asterisk/branches/11

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