From 3db76e85a49901a2049ec3d430685d5c32f7aeba Mon Sep 17 00:00:00 2001 From: tilghman Date: Thu, 29 May 2008 17:35:19 +0000 Subject: Merged revisions 118953 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r118953 | tilghman | 2008-05-29 12:20:16 -0500 (Thu, 29 May 2008) | 3 lines 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/trunk@118955 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 021999abd..4dc9f671a 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -596,9 +596,7 @@ static void mgcp_queue_frame(struct mgcp_subchannel *sub, struct ast_frame *f) ast_channel_unlock(sub->owner); break; } else { - ast_mutex_unlock(&sub->lock); - usleep(1); - ast_mutex_lock(&sub->lock); + DEADLOCK_AVOIDANCE(&sub->lock); } } else break; @@ -614,9 +612,7 @@ static void mgcp_queue_hangup(struct mgcp_subchannel *sub) ast_channel_unlock(sub->owner); break; } else { - ast_mutex_unlock(&sub->lock); - usleep(1); - ast_mutex_lock(&sub->lock); + DEADLOCK_AVOIDANCE(&sub->lock); } } else break; -- cgit v1.2.3