[Asterisk-cvs] asterisk/apps app_voicemail.c,1.210,1.211

mattf at lists.digium.com mattf at lists.digium.com
Tue May 10 14:59:43 CDT 2005


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

Modified Files:
	app_voicemail.c 
Log Message:
Fix to bug 4118


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -d -r1.210 -r1.211
--- app_voicemail.c	8 May 2005 16:44:25 -0000	1.210
+++ app_voicemail.c	10 May 2005 19:05:50 -0000	1.211
@@ -4409,6 +4409,14 @@
 		}
 		if (useadsi)
 			adsi_password(chan);
+
+		if (prefix && !ast_strlen_zero(prefix)) {
+			char fullusername[80] = "";
+			strncpy(fullusername, prefix, sizeof(fullusername) - 1);
+			strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
+			strncpy(mailbox, fullusername, mailbox_size - 1);
+		}
+
 		vmu = find_user(&vmus, context, mailbox);
 		if (vmu && (vmu->password[0] == '\0' || (vmu->password[0] == '-' && vmu->password[1] == '\0'))) {
 			/* saved password is blank, so don't bother asking */
@@ -4423,12 +4431,7 @@
 				return -1;
 			}
 		}
-		if (prefix && !ast_strlen_zero(prefix)) {
-			char fullusername[80] = "";
-			strncpy(fullusername, prefix, sizeof(fullusername) - 1);
-			strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
-			strncpy(mailbox, fullusername, mailbox_size - 1);
-		}
+
 		if (vmu) {
 			passptr = vmu->password;
 			if (passptr[0] == '-') passptr++;




More information about the svn-commits mailing list