[asterisk-commits] file: branch 1.4 r74888 - /branches/1.4/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 12 12:16:29 CDT 2007
Author: file
Date: Thu Jul 12 12:16:28 2007
New Revision: 74888
URL: http://svn.digium.com/view/asterisk?view=rev&rev=74888
Log:
When waiting for a digit ensure that a begin frame was received with it, not just an end frame. (issue #10084 reported by rushowr)
Modified:
branches/1.4/main/channel.c
Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=74888&r1=74887&r2=74888
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Thu Jul 12 12:16:28 2007
@@ -2079,7 +2079,7 @@
/* Wait for a digit, no more than ms milliseconds total. */
while (ms) {
struct ast_channel *rchan;
- int outfd;
+ int outfd, begin_digit = 0;
errno = 0;
rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms);
@@ -2098,7 +2098,12 @@
return -1;
switch(f->frametype) {
- case AST_FRAME_DTMF:
+ case AST_FRAME_DTMF_BEGIN:
+ begin_digit = f->subclass;
+ break;
+ case AST_FRAME_DTMF_END:
+ if (begin_digit != f->subclass)
+ break;
res = f->subclass;
ast_frfree(f);
return res;
More information about the asterisk-commits
mailing list