[Asterisk-cvs] asterisk/apps app_voicemail.c,1.245,1.246

twisted twisted
Fri Sep 9 17:13:36 CDT 2005


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

Modified Files:
	app_voicemail.c 
Log Message:
Set filaneme BEFORE we return from open_mailbox() if we don't have positive message count (Bug #5175)



Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- app_voicemail.c	7 Sep 2005 19:13:00 -0000	1.245
+++ app_voicemail.c	9 Sep 2005 21:13:42 -0000	1.246
@@ -3780,6 +3780,12 @@
 	int count_msg, last_msg;
 
 	ast_copy_string(vms->curbox, mbox(box), sizeof(vms->curbox));
+	
+	/* Rename the member vmbox HERE so that we don't try to return before
+	 * we know what's going on.
+	 */
+	snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox);
+	
 	make_dir(vms->curdir, sizeof(vms->curdir), vmu->context, vms->username, vms->curbox);
 	count_msg = count_messages(vmu, vms->curdir);
 	if (count_msg < 0)
@@ -3805,7 +3811,6 @@
 			return res;
 	}
 
-	snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox);
 	return 0;
 }
 




More information about the svn-commits mailing list