[asterisk-commits] branch 1.2 r28169 - /branches/1.2/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 18 07:27:22 MST 2006


Author: file
Date: Thu May 18 09:27:21 2006
New Revision: 28169

URL: http://svn.digium.com/view/asterisk?rev=28169&view=rev
Log:
Fix endless looping message by checking value of res before doing retries stuff. (issue #7140 reported by tanischen)

Modified:
    branches/1.2/apps/app_voicemail.c

Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=28169&r1=28168&r2=28169&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Thu May 18 09:27:21 2006
@@ -6520,20 +6520,21 @@
 							res = ast_play_and_wait(chan, "vm-star-cancel");
 						if (!res)
 							res = ast_waitfordigit(chan, 6000);
-						if (!res)
+						if (!res) {
 							retries++;
-						if (retries > 3)
-							res = 't';
-							break; 
-
+							if (retries > 3)
+								res = 't';
 						}
-					if (res == 't')
-						res = 0;
-					else if (res == '*')
-						res = -1;
+						break; 
+						
 				}
-			}
-
+				if (res == 't')
+					res = 0;
+				else if (res == '*')
+					res = -1;
+			}
+		}
+		
 	}
 	else if (option == 1) { /* Reply */
 		/* Send reply directly to sender */



More information about the asterisk-commits mailing list