diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-10 15:11:38 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-10 15:11:38 +0000 |
commit | 2b772ac9646c71e87a787047a311c7e5b61a2d07 (patch) | |
tree | ba1d864f82199845aab6a2f174aa6d3b8d844ac7 /res/res_features.c | |
parent | d1fab10737f98b505b68db7849a15206c6390539 (diff) |
Properly lock management stuff (bug #2406)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3759 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rwxr-xr-x | res/res_features.c | 4 |
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, |