From: Jeff Peeler Date: Fri, 12 Nov 2010 21:14:23 +0000 (+0000) Subject: Return correct error code if lock path fails. The recent changes to open_mailbox... X-Git-Tag: 1.6.2.15-rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37e3facacefb0b53078be5a3698afe8c0d4c00ee;p=thirdparty%2Fasterisk.git Return correct error code if lock path fails. The recent changes to open_mailbox actually caused it to be fixed, but let's be consistent. Reported by alecdavis in asterisk-dev. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@294910 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 84ff7e9ea7..73c4ee2e5a 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -7409,7 +7409,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box) if (vm_lock_path(vms->curdir)) { ast_log(AST_LOG_ERROR, "Could not open mailbox %s: mailbox is locked\n", vms->curdir); - return -1; + return ERROR_LOCK_PATH; } /* for local storage, checks directory for messages up to maxmsg limit */