[Asterisk-cvs] asterisk/apps app_voicemail.c,1.190,1.191

markster at lists.digium.com markster at lists.digium.com
Sun Jan 2 19:10:44 CST 2005


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

Modified Files:
	app_voicemail.c 
Log Message:
Merge josh's strlen fix (thanks!) (bug #2893)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- app_voicemail.c	31 Dec 2004 01:11:33 -0000	1.190
+++ app_voicemail.c	3 Jan 2005 01:16:00 -0000	1.191
@@ -4461,7 +4461,7 @@
 				return -1;
 			}
 		}
-		if (prefix) {
+		if (prefix && !ast_strlen_zero(prefix)) {
 			char fullusername[80] = "";
 			strncpy(fullusername, prefix, sizeof(fullusername) - 1);
 			strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
@@ -4476,7 +4476,7 @@
 		else {
 			if (option_verbose > 2)
 				ast_verbose( VERBOSE_PREFIX_3 "Incorrect password '%s' for user '%s' (context = %s)\n", password, mailbox, context ? context : "<any>");
-			if (prefix)
+			if (prefix && !ast_strlen_zero(prefix))
 				strncpy(mailbox, "", mailbox_size -1);
 		}
 		logretries++;




More information about the svn-commits mailing list