mirror of
https://github.com/asterisk/asterisk.git
synced 2026-01-03 21:14:27 +00:00
Make ast_channel_walk become ast_channel_walk_locked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user