[Asterisk-cvs] asterisk/apps app_voicemail.c,1.151.2.15,1.151.2.16

russell at lists.digium.com russell at lists.digium.com
Wed Mar 2 16:26:44 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv8243/apps

Modified Files:
      Tag: v1-0
	app_voicemail.c 
Log Message:
prevent crash with some extra checks while doing authentication (bug #3686)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.151.2.15
retrieving revision 1.151.2.16
diff -u -d -r1.151.2.15 -r1.151.2.16
--- app_voicemail.c	29 Jan 2005 06:53:33 -0000	1.151.2.15
+++ app_voicemail.c	2 Mar 2005 22:24:02 -0000	1.151.2.16
@@ -3411,15 +3411,20 @@
 		logretries++;
 		if (!valid) {
 			if (skipuser || logretries >= maxlogins) {
-				if (ast_streamfile(chan, "vm-incorrect", chan->language))
-					break;
+				if (ast_streamfile(chan, "vm-incorrect", chan->language)) {
+					ast_log(LOG_WARNING, "Unable to stream incorrect message\n");
+					return -1;
+				}
 			} else {
 				if (useadsi)
 					adsi_login(chan);
-				if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language))
-					break;
+				if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) {
+					ast_log(LOG_WARNING, "Unable to stream incorrect mailbox message\n");
+					return -1;
+				}
 			}
-			ast_waitstream(chan, "");
+			if (ast_waitstream(chan, ""))	/* Channel is hung up */
+				return -1;
 		}
 	}
 	if (!valid && (logretries >= maxlogins)) {




More information about the svn-commits mailing list