[asterisk-commits] file: trunk r74891 - in /trunk: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 12 12:17:56 CDT 2007


Author: file
Date: Thu Jul 12 12:17:56 2007
New Revision: 74891

URL: http://svn.digium.com/view/asterisk?view=rev&rev=74891
Log:
Merged revisions 74888 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74888 | file | 2007-07-12 14:16:28 -0300 (Thu, 12 Jul 2007) | 2 lines

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:
    trunk/   (props changed)
    trunk/main/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=74891&r1=74890&r2=74891
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu Jul 12 12:17:56 2007
@@ -1999,7 +1999,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);
@@ -2018,7 +2018,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