mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
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.2@43815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
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);
|
count_msg = count_messages(vmu, vms->curdir);
|
||||||
if (count_msg < 0)
|
if (count_msg < 0)
|
||||||
return count_msg;
|
return count_msg;
|
||||||
|
Reference in New Issue
Block a user