diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-20 16:30:10 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-20 16:30:10 +0000 |
commit | ec76498f552e4ff10adcaa0ffc27d1c21cb5792e (patch) | |
tree | efbb775d4f7e80cb61b314075217774d082e881a /apps/app_softhangup.c | |
parent | 7e42c962d89de0673789eed30649fc7ae276aa50 (diff) |
Make ast_channel_walk become ast_channel_walk_locked
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3029 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_softhangup.c')
-rwxr-xr-x | apps/app_softhangup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c index 497f03860..43a42247c 100755 --- a/apps/app_softhangup.c +++ b/apps/app_softhangup.c @@ -47,13 +47,15 @@ static int softhangup_exec(struct ast_channel *chan, void *data) return 0; } LOCAL_USER_ADD(u); - c = ast_channel_walk(NULL); + c = ast_channel_walk_locked(NULL); while (c) { if (!strcasecmp(c->name, data)) { ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT); + ast_mutex_unlock(&c->lock); break; } - c = ast_channel_walk(c); + ast_mutex_unlock(&c->lock); + c = ast_channel_walk_locked(c); } LOCAL_USER_REMOVE(u); |