Small bug big fix for MGCP (bug #2888)
authorMark Spencer <markster@digium.com>
Wed, 17 Nov 2004 14:48:16 +0000 (14:48 +0000)
committerMark Spencer <markster@digium.com>
Wed, 17 Nov 2004 14:48:16 +0000 (14:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4277 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_mgcp.c

index e53eb61..b428bcc 100755 (executable)
@@ -580,6 +580,7 @@ static void mgcp_queue_frame(struct mgcp_subchannel *sub, struct ast_frame *f)
                        if (!ast_mutex_trylock(&sub->owner->lock)) {
                                ast_queue_frame(sub->owner, f);
                                ast_mutex_unlock(&sub->owner->lock);
+                               break;
                        } else {
                                ast_mutex_unlock(&sub->lock);
                                usleep(1);
@@ -597,6 +598,7 @@ static void mgcp_queue_hangup(struct mgcp_subchannel *sub)
                        if (!ast_mutex_trylock(&sub->owner->lock)) {
                                ast_queue_hangup(sub->owner);
                                ast_mutex_unlock(&sub->owner->lock);
+                               break;
                        } else {
                                ast_mutex_unlock(&sub->lock);
                                usleep(1);