From bca55854e272254e9a80c364a93a11de94fd66cd Mon Sep 17 00:00:00 2001 From: tilghman Date: Thu, 29 May 2008 17:20:16 +0000 Subject: Add some debugging code that ensures that when we do deadlock avoidance, we don't lose the information about how a lock was originally acquired. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118953 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_mgcp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'channels/chan_mgcp.c') diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index bd57e54f3..5bc1afd99 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -574,9 +574,7 @@ static void mgcp_queue_frame(struct mgcp_subchannel *sub, struct ast_frame *f) ast_mutex_unlock(&sub->owner->lock); break; } else { - ast_mutex_unlock(&sub->lock); - usleep(1); - ast_mutex_lock(&sub->lock); + DEADLOCK_AVOIDANCE(&sub->lock); } } else break; @@ -592,9 +590,7 @@ static void mgcp_queue_hangup(struct mgcp_subchannel *sub) ast_mutex_unlock(&sub->owner->lock); break; } else { - ast_mutex_unlock(&sub->lock); - usleep(1); - ast_mutex_lock(&sub->lock); + DEADLOCK_AVOIDANCE(&sub->lock); } } else break; -- cgit v1.2.3