summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-09-29 20:16:30 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-09-29 20:16:30 +0000
commit6bd618e1a128a71134bdd7550cfa56a81ef59a26 (patch)
tree0e4178c8ebc15757f2545bda4256bfec02c3979e /apps
parent6a7d70ac2df0a96b92b635959be0f230857e7052 (diff)
Remove locking conflict
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6e50108e6..157b2e7ca 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1621,6 +1621,7 @@ static void copy_file(char *frompath, char *topath)
/*
* 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)
{
@@ -1630,9 +1631,6 @@ static int last_message_index(struct ast_vm_user *vmu, char *dir)
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
* is partially due to stat(2) internally doing a readdir(2) itself to
@@ -1648,7 +1646,6 @@ static int last_message_index(struct ast_vm_user *vmu, char *dir)
if (map[x] == 0)
break;
}
- ast_unlock_path(dir);
return x - 1;
}