Bug 5960
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 8 Dec 2005 23:46:21 +0000 (23:46 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 8 Dec 2005 23:46:21 +0000 (23:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7407 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 03ddc7b..dec07f9 100644 (file)
@@ -536,10 +536,10 @@ static struct ast_vm_user *find_user_realtime(struct ast_vm_user *ivm, const cha
                if (mailbox) 
                        ast_copy_string(retval->mailbox, mailbox, sizeof(retval->mailbox));
                populate_defaults(retval);
-               if (ast_test_flag((&globalflags), VM_SEARCH))
+               if (!context && ast_test_flag((&globalflags), VM_SEARCH))
                        var = ast_load_realtime("voicemail", "mailbox", mailbox, NULL);
                else
-                       var = ast_load_realtime("voicemail", "mailbox", mailbox, "context", retval->context, NULL);
+                       var = ast_load_realtime("voicemail", "mailbox", mailbox, "context", context, NULL);
                if (var) {
                        tmp = var;
                        while(tmp) {