]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 43815 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Sep 2006 20:21:54 +0000 (20:21 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Sep 2006 20:21:54 +0000 (20:21 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43815 | tilghman | 2006-09-27 15:20:35 -0500 (Wed, 27 Sep 2006) | 2 lines

Avoid inability to lock directory log message by creating the directory ahead of time. (Issue 7631)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43816 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 5c6a8434132c21ea43de9109de0eaf77de46aa50..429a92688f01d480abb8b786489c77f0ed05ecc1 100644 (file)
@@ -4502,7 +4502,9 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
         */
        snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox);
        
-       make_dir(vms->curdir, sizeof(vms->curdir), vmu->context, vms->username, vms->curbox);
+       /* Faster to make the directory than to check if it exists. */
+       create_dirpath(vms->curdir, sizeof(vms->curdir), vmu->context, vms->username, vms->curbox);
+
        count_msg = count_messages(vmu, vms->curdir);
        if (count_msg < 0)
                return count_msg;