[asterisk-commits] tilghman: trunk r44033 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 29 13:16:30 MST 2006


Author: tilghman
Date: Fri Sep 29 15:16:30 2006
New Revision: 44033

URL: http://svn.digium.com/view/asterisk?rev=44033&view=rev
Log:
Remove locking conflict

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=44033&r1=44032&r2=44033&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Sep 29 15:16:30 2006
@@ -1621,6 +1621,7 @@
 
 /*
  * A negative return value indicates an error.
+ * \note Should always be called with a lock already set on dir.
  */
 static int last_message_index(struct ast_vm_user *vmu, char *dir)
 {
@@ -1629,9 +1630,6 @@
 	DIR *msgdir;
 	struct dirent *msgdirent;
 	int msgdirint;
-
-	if (vm_lock_path(dir))
-		return ERROR_LOCK_PATH;
 
 	/* Reading the entire directory into a file map scales better than
 	 * doing a stat repeatedly on a predicted sequence.  I suspect this
@@ -1648,7 +1646,6 @@
 		if (map[x] == 0)
 			break;
 	}
-	ast_unlock_path(dir);
 
 	return x - 1;
 }



More information about the asterisk-commits mailing list