[asterisk-commits] file: trunk r43829 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 27 14:41:26 MST 2006


Author: file
Date: Wed Sep 27 16:41:25 2006
New Revision: 43829

URL: http://svn.digium.com/view/asterisk?rev=43829&view=rev
Log:
Finish up last commit

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=43829&r1=43828&r2=43829&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Wed Sep 27 16:41:25 2006
@@ -4519,8 +4519,15 @@
 	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);
-	if (last_msg < 0)
+	ast_unlock_path(vms->curdir);
+
+	if (last_msg < 0) 
 		return last_msg;
 	else if (vms->lastmsg != last_msg)
 	{



More information about the asterisk-commits mailing list