aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-09 06:23:49 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-09 06:23:49 +0000
commit1eab36010a376ceaa96b438bda967ab894ec0067 (patch)
tree2452c5f9c65be3dc697aa5e85ff1a23c729ce36d /apps
parent8aded204cd453dff3bb6402bdecf2c2f76245c25 (diff)
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) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103197 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 4cf6895d1..85afac465 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4117,7 +4117,11 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
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));