From 1f538ad219ef5abf2b38cd045f84279744f4c951 Mon Sep 17 00:00:00 2001 From: Josh Roberson Date: Wed, 30 Nov 2005 03:35:24 +0000 Subject: issue #5887 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7225 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/app_voicemail.c') diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 2f9c515c8..2dab9fac0 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -573,8 +573,12 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, const char *contex struct ast_vm_user *vmu=NULL, *cur; ast_mutex_lock(&vmlock); cur = users; + + if (!context) + context = "default"; + while (cur) { - if ((!context || !strcasecmp(context, cur->context)) && + if ((!strcasecmp(context, cur->context)) && (!strcasecmp(mailbox, cur->mailbox))) break; cur=cur->next; @@ -4985,7 +4989,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_ valid++; else { if (option_verbose > 2) - ast_verbose( VERBOSE_PREFIX_3 "Incorrect password '%s' for user '%s' (context = %s)\n", password, mailbox, context ? context : ""); + ast_verbose( VERBOSE_PREFIX_3 "Incorrect password '%s' for user '%s' (context = %s)\n", password, mailbox, context ? context : "default"); if (!ast_strlen_zero(prefix)) mailbox[0] = '\0'; } -- cgit v1.2.3