Fixes to mailbox exists
authorMark Spencer <markster@digium.com>
Sun, 23 May 2004 04:21:42 +0000 (04:21 +0000)
committerMark Spencer <markster@digium.com>
Sun, 23 May 2004 04:21:42 +0000 (04:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3043 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 8098fe6..c0c3d06 100755 (executable)
@@ -3440,7 +3440,11 @@ static int vm_box_exists(struct ast_channel *chan, void *data) {
                box = context;
                context = "default";
        }
-
+       while(*box) {
+               if ((*box != 'u') && (*box != 's') && (*box != 'b'))
+                       break;
+               box++;
+       }
        ast_mutex_lock(&vmlock);
        user = users;
        while (user) {
@@ -3448,6 +3452,7 @@ static int vm_box_exists(struct ast_channel *chan, void *data) {
                        branch = 1;
                        break;
                }
+               user = user->next;
        }
        ast_mutex_unlock(&vmlock);