[asterisk-commits] lmadsen: tag 1.6.2.9-rc2 r268577 - in /tags/1.6.2.9-rc2: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 7 10:34:19 CDT 2010


Author: lmadsen
Date: Mon Jun  7 10:34:16 2010
New Revision: 268577

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=268577
Log:
Update ChangeLog and merge revision 268457 from the 1.6.2 branch.

Modified:
    tags/1.6.2.9-rc2/.version
    tags/1.6.2.9-rc2/ChangeLog
    tags/1.6.2.9-rc2/main/dsp.c

Modified: tags/1.6.2.9-rc2/.version
URL: http://svnview.digium.com/svn/asterisk/tags/1.6.2.9-rc2/.version?view=diff&rev=268577&r1=268576&r2=268577
==============================================================================
--- tags/1.6.2.9-rc2/.version (original)
+++ tags/1.6.2.9-rc2/.version Mon Jun  7 10:34:16 2010
@@ -1,1 +1,1 @@
-1.6.2.9-rc1
+1.6.2.9-rc2

Modified: tags/1.6.2.9-rc2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/1.6.2.9-rc2/ChangeLog?view=diff&rev=268577&r1=268576&r2=268577
==============================================================================
--- tags/1.6.2.9-rc2/ChangeLog (original)
+++ tags/1.6.2.9-rc2/ChangeLog Mon Jun  7 10:34:16 2010
@@ -1,3 +1,24 @@
+2010-06-07  Leif Madsen <lmadsen at digium.com>
+
+	* Asterisk 1.6.2.9-rc2 Released.
+
+2010-06-07  Tilghman Lesher <tlesher at digium.com>
+
+	* Fix crash in DTMF detection.
+
+	  What I did not originally see in my previous commit was that even 
+	  though the next digit could be detected before the previous was 
+	  considered ended, the detection of the next digit effectively ends 
+	  the detection of the previous. Therefore, the length moves in 
+	  lockstep with the digit, and no separate counter is needed for the 
+	  length alone.
+
+	  (closes issue 0017371)
+	   Reported by: alecdavis
+
+	  (closes issue 0017474)
+	   Reported by: kenner
+
 2010-06-01  Leif Madsen <lmadsen at digium.com>
 
 	* Asterisk 1.6.2.9-rc1 Released.

Modified: tags/1.6.2.9-rc2/main/dsp.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.6.2.9-rc2/main/dsp.c?view=diff&rev=268577&r1=268576&r2=268577
==============================================================================
--- tags/1.6.2.9-rc2/main/dsp.c (original)
+++ tags/1.6.2.9-rc2/main/dsp.c Mon Jun  7 10:34:16 2010
@@ -273,11 +273,8 @@
 typedef struct
 {
 	char digits[MAX_DTMF_DIGITS + 1];
+	int digitlen[MAX_DTMF_DIGITS + 1];
 	int current_digits;
-	/* Store lengths separately, because next digit may begin before last has
-	 * ended (because hits_to_begin may be less than misses_to_end). */
-	int digitlen[MAX_DTMF_DIGITS + 1];
-	int current_len;
 	int detected_digits;
 	int lost_digits;
 
@@ -515,7 +512,6 @@
 static void ast_digit_detect_init(digit_detect_state_t *s, int mf)
 {
 	s->current_digits = 0;
-	s->current_len = 0;
 	s->detected_digits = 0;
 	s->lost_digits = 0;
 	s->digits[0] = '\0';
@@ -739,8 +735,8 @@
 				}
 			} else {
 				s->td.dtmf.misses = 0;
-				/* Current hit was same as last, so increment digit duration */
-				s->digitlen[s->current_len] += DTMF_GSIZE;
+				/* Current hit was same as last, so increment digit duration (of last digit) */
+				s->digitlen[s->current_digits - 1] += DTMF_GSIZE;
 			}
 		}
 
@@ -1423,9 +1419,8 @@
 					event_len = dsp->digit_state.digitlen[0] * 1000 / SAMPLE_RATE;
 				}
 				memmove(&dsp->digit_state.digits[0], &dsp->digit_state.digits[1], dsp->digit_state.current_digits);
+				memmove(&dsp->digit_state.digitlen[0], &dsp->digit_state.digitlen[1], dsp->digit_state.current_digits * sizeof(dsp->digit_state.digitlen[0]));
 				dsp->digit_state.current_digits--;
-				memmove(&dsp->digit_state.digitlen[0], &dsp->digit_state.digitlen[1], dsp->digit_state.current_len * sizeof(dsp->digit_state.digitlen[0]));
-				dsp->digit_state.current_len--;
 				dsp->dtmf_began = 0;
 
 				if (dsp->features & DSP_FEATURE_BUSY_DETECT) {




More information about the asterisk-commits mailing list