mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
Properly lock management stuff (bug #2406)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user