[asterisk-commits] seanbright: branch group/1.6.1-maintenance r264113 - in /team/group/1.6.1-mai...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 19 08:15:54 CDT 2010


Author: seanbright
Date: Wed May 19 08:15:51 2010
New Revision: 264113

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264113
Log:
Merged revisions 263904,263950,264031 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r263904 | dvossel | 2010-05-18 18:48:51 -0400 (Tue, 18 May 2010) | 9 lines
  
  fixes segfault on logging 
  
  (closes issue #17331)
  Reported by: under
  Patches:
        utils.diff uploaded by under (license 914)
        segfault_on_logging.diff uploaded by dvossel (license 671)
  Tested by: under, dvossel
................
  r263950 | tilghman | 2010-05-19 02:41:04 -0400 (Wed, 19 May 2010) | 15 lines
  
  Merged revisions 263949 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r263949 | tilghman | 2010-05-19 01:32:27 -0500 (Wed, 19 May 2010) | 8 lines
    
    Because progress is called multiple times, across several frames, we must persist states when detecting multitone sequences.
    
    (closes issue #16749)
     Reported by: dant
     Patches: 
           dsp.c-bug16749-1.patch uploaded by dant (license 670)
     Tested by: dant
  ........
................
  r264031 | alecdavis | 2010-05-19 04:09:14 -0400 (Wed, 19 May 2010) | 8 lines
  
  fix incorrectly typed indications for [nz] stutter and dialrecall
  
  (closes issue #17359)
  Reported by: alecdavis
  Patches: 
        bug17359.diff.txt uploaded by alecdavis (license 585)
................

Modified:
    team/group/1.6.1-maintenance/   (props changed)
    team/group/1.6.1-maintenance/configs/indications.conf.sample
    team/group/1.6.1-maintenance/main/dsp.c
    team/group/1.6.1-maintenance/main/utils.c

Propchange: team/group/1.6.1-maintenance/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: team/group/1.6.1-maintenance/configs/indications.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/configs/indications.conf.sample?view=diff&rev=264113&r1=264112&r2=264113
==============================================================================
--- team/group/1.6.1-maintenance/configs/indications.conf.sample (original)
+++ team/group/1.6.1-maintenance/configs/indications.conf.sample Wed May 19 08:15:51 2010
@@ -479,10 +479,10 @@
 ring = 400+450/400,0/200,400+450/400,0/2000
 congestion = 400/375,0/375
 callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200
-dialrecall = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
+dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
 record = 1400/425,0/15000
 info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400
-stutter = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
+stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
 unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400
 
 [ph]

Modified: team/group/1.6.1-maintenance/main/dsp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/main/dsp.c?view=diff&rev=264113&r1=264112&r2=264113
==============================================================================
--- team/group/1.6.1-maintenance/main/dsp.c (original)
+++ team/group/1.6.1-maintenance/main/dsp.c Wed May 19 08:15:51 2010
@@ -981,11 +981,15 @@
 				} else if (hz[HZ_950] > TONE_MIN_THRESH * TONE_THRESH) {
 					newstate = DSP_TONE_STATE_SPECIAL1;
 				} else if (hz[HZ_1400] > TONE_MIN_THRESH * TONE_THRESH) {
-					if (dsp->tstate == DSP_TONE_STATE_SPECIAL1)
+					/* End of SPECIAL1 or middle of SPECIAL2 */
+					if (dsp->tstate == DSP_TONE_STATE_SPECIAL1 || dsp->tstate == DSP_TONE_STATE_SPECIAL2) {
 						newstate = DSP_TONE_STATE_SPECIAL2;
+					}
 				} else if (hz[HZ_1800] > TONE_MIN_THRESH * TONE_THRESH) {
-					if (dsp->tstate == DSP_TONE_STATE_SPECIAL2)
+					/* End of SPECIAL2 or middle of SPECIAL3 */
+					if (dsp->tstate == DSP_TONE_STATE_SPECIAL2 || dsp->tstate == DSP_TONE_STATE_SPECIAL3) {
 						newstate = DSP_TONE_STATE_SPECIAL3;
+					}
 				} else if (dsp->genergy > TONE_MIN_THRESH * TONE_THRESH) {
 					newstate = DSP_TONE_STATE_TALKING;
 				} else
@@ -1012,43 +1016,43 @@
 				if (dsp->ringtimeout)
 					dsp->ringtimeout++;
 				switch (dsp->tstate) {
-					case DSP_TONE_STATE_RINGING:
-						if ((dsp->features & DSP_PROGRESS_RINGING) &&
-						    (dsp->tcount==THRESH_RING)) {
-							res = AST_CONTROL_RINGING;
-							dsp->ringtimeout= 1;
-						}
-						break;
-					case DSP_TONE_STATE_BUSY:
-						if ((dsp->features & DSP_PROGRESS_BUSY) &&
-						    (dsp->tcount==THRESH_BUSY)) {
-							res = AST_CONTROL_BUSY;
-							dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
-						}
-						break;
-					case DSP_TONE_STATE_TALKING:
-						if ((dsp->features & DSP_PROGRESS_TALK) &&
-						    (dsp->tcount==THRESH_TALK)) {
-							res = AST_CONTROL_ANSWER;
-							dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
-						}
-						break;
-					case DSP_TONE_STATE_SPECIAL3:
-						if ((dsp->features & DSP_PROGRESS_CONGESTION) &&
-						    (dsp->tcount==THRESH_CONGESTION)) {
-							res = AST_CONTROL_CONGESTION;
-							dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
-						}
-						break;
-					case DSP_TONE_STATE_HUNGUP:
-						if ((dsp->features & DSP_FEATURE_CALL_PROGRESS) &&
-						    (dsp->tcount==THRESH_HANGUP)) {
-							res = AST_CONTROL_HANGUP;
-							dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
-						}
-						break;
+				case DSP_TONE_STATE_RINGING:
+					if ((dsp->features & DSP_PROGRESS_RINGING) &&
+					    (dsp->tcount == THRESH_RING)) {
+						res = AST_CONTROL_RINGING;
+						dsp->ringtimeout = 1;
+					}
+					break;
+				case DSP_TONE_STATE_BUSY:
+					if ((dsp->features & DSP_PROGRESS_BUSY) &&
+					    (dsp->tcount == THRESH_BUSY)) {
+						res = AST_CONTROL_BUSY;
+						dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
+					}
+					break;
+				case DSP_TONE_STATE_TALKING:
+					if ((dsp->features & DSP_PROGRESS_TALK) &&
+					    (dsp->tcount == THRESH_TALK)) {
+						res = AST_CONTROL_ANSWER;
+						dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
+					}
+					break;
+				case DSP_TONE_STATE_SPECIAL3:
+					if ((dsp->features & DSP_PROGRESS_CONGESTION) &&
+					    (dsp->tcount == THRESH_CONGESTION)) {
+						res = AST_CONTROL_CONGESTION;
+						dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
+					}
+					break;
+				case DSP_TONE_STATE_HUNGUP:
+					if ((dsp->features & DSP_FEATURE_CALL_PROGRESS) &&
+					    (dsp->tcount == THRESH_HANGUP)) {
+						res = AST_CONTROL_HANGUP;
+						dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
+					}
+					break;
 				}
-				if (dsp->ringtimeout==THRESH_RING2ANSWER) {
+				if (dsp->ringtimeout == THRESH_RING2ANSWER) {
 					ast_debug(1, "Consider call as answered because of timeout after last ring\n");
 					res = AST_CONTROL_ANSWER;
 					dsp->features &= ~DSP_FEATURE_CALL_PROGRESS;
@@ -1059,8 +1063,8 @@
 				dsp->tstate = newstate;
 				dsp->tcount = 1;
 			}
-			
-			/* Reset goertzel */						
+
+			/* Reset goertzel */
 			for (x=0;x<7;x++)
 				dsp->freqs[x].v2 = dsp->freqs[x].v3 = 0.0;
 			dsp->gsamps = 0;

Modified: team/group/1.6.1-maintenance/main/utils.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/main/utils.c?view=diff&rev=264113&r1=264112&r2=264113
==============================================================================
--- team/group/1.6.1-maintenance/main/utils.c (original)
+++ team/group/1.6.1-maintenance/main/utils.c Wed May 19 08:15:51 2010
@@ -1786,16 +1786,17 @@
 		 * reallocate the buffer and return a message telling to retry.
 		 */
 		if (need > (*buf)->len && (max_len == 0 || (*buf)->len < max_len) ) {
+			int len = (int)(*buf)->len;
 			if (max_len && max_len < need) {	/* truncate as needed */
 				need = max_len;
 			} else if (max_len == 0) {	/* if unbounded, give more room for next time */
 				need += 16 + need / 4;
 			}
 			if (0) {	/* debugging */
-				ast_verbose("extend from %d to %d\n", (int)(*buf)->len, need);
+				ast_verbose("extend from %d to %d\n", len, need);
 			}
 			if (ast_str_make_space(buf, need)) {
-				ast_verbose("failed to extend from %d to %d\n", (int)(*buf)->len, need);
+				ast_verbose("failed to extend from %d to %d\n", len, need);
 				va_end(aq);
 				return AST_DYNSTR_BUILD_FAILED;
 			}




More information about the asterisk-commits mailing list