summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-09-10 15:11:38 +0000
committerMark Spencer <markster@digium.com>2004-09-10 15:11:38 +0000
commit00f227a6848878eaffb6bf2bc162e11844e9f5e2 (patch)
treeba1d864f82199845aab6a2f174aa6d3b8d844ac7 /res
parenta6e748e49185a54da4985b4e15d5b92a0150ced9 (diff)
Properly lock management stuff (bug #2406)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rwxr-xr-xres/res_features.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 2697f1fcd..e9cb7e7c3 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -797,6 +797,7 @@ static int manager_parking_status( struct mansession *s, struct message *m )
cur=parkinglot;
while(cur) {
+ ast_mutex_lock(&s->lock);
ast_cli(s->fd, "Event: ParkedCall\r\n"
"Exten: %d\r\n"
"Channel: %s\r\n"
@@ -808,8 +809,9 @@ static int manager_parking_status( struct mansession *s, struct message *m )
,(long)cur->start.tv_sec + (long)(cur->parkingtime/1000) - (long)time(NULL)
,(cur->chan->callerid ? cur->chan->callerid : "")
,idText);
+ ast_mutex_unlock(&s->lock);
- cur = cur->next;
+ cur = cur->next;
}
ast_cli(s->fd,