fix channel walking problems from recent changes (bug #4494)
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 9 Jun 2005 19:27:19 +0000 (19:27 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 9 Jun 2005 19:27:19 +0000 (19:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5883 65c4cc65-6c06-0410-ace0-fbb531ad65f3

app.c
manager.c

diff --git a/app.c b/app.c
index bb21be9..5e5230e 100755 (executable)
--- a/app.c
+++ b/app.c
@@ -1059,7 +1059,6 @@ int ast_app_group_match_get_count(char *groupmatch, char *category)
                if (test && !regexec(&regexbuf, test, 0, NULL, 0))
                        count++;
                ast_mutex_unlock(&chan->lock);
                if (test && !regexec(&regexbuf, test, 0, NULL, 0))
                        count++;
                ast_mutex_unlock(&chan->lock);
-               chan = ast_channel_walk_locked(chan);
        }
 
        regfree(&regexbuf);
        }
 
        regfree(&regexbuf);
index c006586..4f968cd 100755 (executable)
--- a/manager.c
+++ b/manager.c
@@ -753,6 +753,7 @@ static int action_status(struct mansession *s, struct message *m)
                        ast_state2str(c->_state), bridge, c->uniqueid, idText);
                }
                ast_mutex_unlock(&s->lock);
                        ast_state2str(c->_state), bridge, c->uniqueid, idText);
                }
                ast_mutex_unlock(&s->lock);
+               ast_mutex_unlock(&c->lock);
                if (!all)
                        break;
                c = ast_channel_walk_locked(c);
                if (!all)
                        break;
                c = ast_channel_walk_locked(c);