diff options
author | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-30 03:52:18 +0000 |
---|---|---|
committer | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-30 03:52:18 +0000 |
commit | 32a052d92a99701bd1f0fc043565d12a10d58e93 (patch) | |
tree | 8da87efeaceb84ed8833a75ca36cacf8d0a3e537 | |
parent | 3d3a6cffa0e7f4fbe94b7a3af647aa0a3f26c9b0 (diff) |
backport fix from trunk
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7227 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | UPGRADE.txt | 4 | ||||
-rw-r--r-- | apps/app_voicemail.c | 8 |
3 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2005-11-29 Josh Roberson <josh@asteriasgi.com> + + * apps/app_voicemail.c: Only look in 'default' context when no context defined to VoiceMailMain(). (issue #5887) + 2005-11-25 Russell Bryant <russell@digium.com> * apps/app_dial.c: Properly duplicate the string for ANI (issue #5850) diff --git a/UPGRADE.txt b/UPGRADE.txt index b17b16dde..db9eab845 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -131,6 +131,10 @@ Applications: 'mailbox options' menu, and 'change your password' option has been moved to option 5. +* The application VoiceMailMain now only matches the 'default' context if + none is specified in the arguments. (This was the previously + documented behavior, however, we didn't follow that behavior.) + Queues: * A queue is now considered empty not only if there are no members but if diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 10c8df484..baa618f42 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 : "<any>"); + 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'; } |