diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 20:20:35 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 20:20:35 +0000 |
commit | 62317176b80076afc6d7157ed4a1819c62c4f540 (patch) | |
tree | faa0ef6878c483f75c9cbbe1b798cd00b722e686 /apps | |
parent | cb4b934c7e544005a0ce1541ca607df71c96fff1 (diff) |
Avoid inability to lock directory log message by creating the directory ahead of time. (Issue 7631)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43815 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 70c9a1729..a2773dd7a 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3806,7 +3806,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; |