[svn-commits] jpeeler: branch 1.6.1 r258435 - in /branches/1.6.1: ./ apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Apr 21 17:10:57 CDT 2010


Author: jpeeler
Date: Wed Apr 21 17:10:56 2010
New Revision: 258435

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=258435
Log:
Merged revisions 258433 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r258433 | jpeeler | 2010-04-21 16:56:09 -0500 (Wed, 21 Apr 2010) | 15 lines
  
  Merged revisions 258432 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r258432 | jpeeler | 2010-04-21 16:45:36 -0500 (Wed, 21 Apr 2010) | 8 lines
    
    Fix looping forever when no input received in certain voicemail menu scenarios.
    
    Specifically, prompting for an extension (when leaving or forwarding a message)
    or when prompting for a digit (when saving a message or changing folders).
    
    ABE-2122
    SWP-1268
  ........
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/apps/app_voicemail.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/apps/app_voicemail.c?view=diff&rev=258435&r1=258434&r2=258435
==============================================================================
--- branches/1.6.1/apps/app_voicemail.c (original)
+++ branches/1.6.1/apps/app_voicemail.c Wed Apr 21 17:10:56 2010
@@ -6190,10 +6190,16 @@
 static int get_folder2(struct ast_channel *chan, char *fn, int start)
 {
 	int res = 0;
+	int loops = 0;
 	res = ast_play_and_wait(chan, fn);	/* Folder name */
 	while (((res < '0') || (res > '9')) &&
-			(res != '#') && (res >= 0)) {
+			(res != '#') && (res >= 0) &&
+			loops < 4) {
 		res = get_folder(chan, 0);
+		loops++;
+	}
+	if (loops == 4) { /* give up */
+		return '#';
 	}
 	return res;
 }
@@ -6508,6 +6514,7 @@
 	int curmsg;
 	char urgent_str[7] = "";
 	char tmptxtfile[PATH_MAX];
+	int prompt_played = 0;
 #ifndef IMAP_STORAGE
 	char msgfile[PATH_MAX], textfile[PATH_MAX], backup[PATH_MAX], backup_textfile[PATH_MAX];
 #endif
@@ -6593,7 +6600,8 @@
 		} else {
 			/* Ask for an extension */
 			res = ast_streamfile(chan, "vm-extension", chan->language);	/* "extension" */
-			if (res)
+			prompt_played++;
+			if (res || prompt_played > 4)
 				break;
 			if ((res = ast_readstring(chan, username, sizeof(username) - 1, 2000, 10000, "#") < 0))
 				break;




More information about the svn-commits mailing list