From b9f37c0e992c5cad53a18b2dc1fdc80e67f3f108 Mon Sep 17 00:00:00 2001 From: russell Date: Mon, 17 Sep 2007 22:59:36 +0000 Subject: convert various places that access the channel lock directly to use the channel lock wrappers git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82728 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_mgcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'channels/chan_mgcp.c') diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index c4306e3be..1432ba786 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -599,9 +599,9 @@ static void mgcp_queue_frame(struct mgcp_subchannel *sub, struct ast_frame *f) { for(;;) { if (sub->owner) { - if (!ast_mutex_trylock(&sub->owner->lock)) { + if (!ast_channel_trylock(sub->owner)) { ast_queue_frame(sub->owner, f); - ast_mutex_unlock(&sub->owner->lock); + ast_channel_unlock(sub->owner); break; } else { ast_mutex_unlock(&sub->lock); @@ -617,9 +617,9 @@ static void mgcp_queue_hangup(struct mgcp_subchannel *sub) { for(;;) { if (sub->owner) { - if (!ast_mutex_trylock(&sub->owner->lock)) { + if (!ast_channel_trylock(sub->owner)) { ast_queue_hangup(sub->owner); - ast_mutex_unlock(&sub->owner->lock); + ast_channel_unlock(sub->owner); break; } else { ast_mutex_unlock(&sub->lock); -- cgit v1.2.3