mirror of
https://github.com/asterisk/asterisk.git
synced 2025-12-12 10:02:27 +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:
@@ -8511,7 +8511,7 @@ static int action_zapshowchannels(struct mansession *s, struct message *m)
|
||||
while (tmp) {
|
||||
if (tmp->channel > 0) {
|
||||
int alarm = get_alarms(tmp);
|
||||
|
||||
ast_mutex_lock(&s->lock);
|
||||
ast_cli(s->fd,
|
||||
"Event: ZapShowChannels\r\n"
|
||||
"Channel: %d\r\n"
|
||||
@@ -8522,6 +8522,7 @@ static int action_zapshowchannels(struct mansession *s, struct message *m)
|
||||
"\r\n",
|
||||
tmp->channel, sig2str(tmp->sig), tmp->context,
|
||||
alarm2str(alarm), idText);
|
||||
ast_mutex_unlock(&s->lock);
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
@@ -8529,12 +8530,13 @@ static int action_zapshowchannels(struct mansession *s, struct message *m)
|
||||
|
||||
ast_mutex_unlock(&iflock);
|
||||
|
||||
ast_mutex_lock(&s->lock);
|
||||
ast_cli(s->fd,
|
||||
"Event: ZapShowChannelsComplete\r\n"
|
||||
"%s"
|
||||
"\r\n",
|
||||
idText);
|
||||
|
||||
ast_mutex_unlock(&s->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user