[asterisk-commits] tilghman: branch 1.4 r103197 - /branches/1.4/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 9 00:23:50 CST 2008


Author: tilghman
Date: Sat Feb  9 00:23:49 2008
New Revision: 103197

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103197
Log:
Commit fix for being unable to send voicemail from VoiceMailMain
 Reported by: William F Acker (via the -users mailing list)
 Patch by: Corydon76 (license 14)

Modified:
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=103197&r1=103196&r2=103197
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Sat Feb  9 00:23:49 2008
@@ -4117,7 +4117,11 @@
 	if (flag==1) {
 		struct leave_vm_options leave_options;
 		char mailbox[AST_MAX_EXTENSION * 2 + 2];
-		snprintf(mailbox, sizeof(mailbox), "%s@%s", username, context);
+		/* Make sure that context doesn't get set as a literal "(null)" (or else find_user won't find it) */
+		if (context)
+			snprintf(mailbox, sizeof(mailbox), "%s@%s", username, context);
+		else
+			ast_copy_string(mailbox, username, sizeof(mailbox));
 
 		/* Send VoiceMail */
 		memset(&leave_options, 0, sizeof(leave_options));




More information about the asterisk-commits mailing list