convert various places that access the channel lock directly to use the channel lock wrappers

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-09-17 22:59:36 +00:00
parent 0d1abc92fe
commit ded76a8988
7 changed files with 64 additions and 68 deletions

View File

@@ -1183,10 +1183,8 @@ static int check_availability(struct agent_pvt *newlyavailable, int needlock)
ast_copy_string(parent->context, chan->context, sizeof(parent->context));
/* Go ahead and mark the channel as a zombie so that masquerade will
destroy it for us, and we need not call ast_hangup */
ast_mutex_lock(&parent->lock);
ast_set_flag(chan, AST_FLAG_ZOMBIE);
ast_channel_masquerade(parent, chan);
ast_mutex_unlock(&parent->lock);
p->abouttograb = 0;
} else {
ast_debug(1, "Sneaky, parent disappeared in the mean time...\n");