Finish up last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
7b0ba1bc7e
commit
7a336e9f9d
|
@ -4519,8 +4519,15 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
|
||||||
detected.
|
detected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (vm_lock_path(vms->curdir)) {
|
||||||
|
ast_log(LOG_ERROR, "Could not open mailbox %s: mailbox is locked\n", vms->curdir);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
last_msg = last_message_index(vmu, vms->curdir);
|
last_msg = last_message_index(vmu, vms->curdir);
|
||||||
if (last_msg < 0)
|
ast_unlock_path(vms->curdir);
|
||||||
|
|
||||||
|
if (last_msg < 0)
|
||||||
return last_msg;
|
return last_msg;
|
||||||
else if (vms->lastmsg != last_msg)
|
else if (vms->lastmsg != last_msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue