--- chan_mgcp.c 2004-12-29 17:09:18 +0200 +++ chan_mgcp.c.kram 2004-12-28 16:10:08 +0200 @@ -2778,10 +2778,11 @@ ast_log(LOG_WARNING, "Unable to masquerade %s as %s\n", ast_bridged_channel(p->sub->owner)->name, p->sub->next->owner->name); return -1; } /* Orphan the channel */ + ast_mutex_unlock(&p->sub->next->lock); unalloc_sub(p->sub->next); } else if (ast_bridged_channel(p->sub->next->owner)) { if (p->sub->owner->_state == AST_STATE_RINGING) { ast_indicate(ast_bridged_channel(p->sub->next->owner), AST_CONTROL_RINGING); } @@ -2794,10 +2795,11 @@ /*swap_subs(p, SUB_THREEWAY, SUB_REAL);*/ if (option_verbose > 2) { ast_verbose(VERBOSE_PREFIX_3 "Swapping %d for %d on %s@%s\n", p->sub->id, p->sub->next->id, p->name, p->parent->name); } p->sub = p->sub->next; + ast_mutex_unlock(&p->sub->next->lock); unalloc_sub(p->sub->next); /* Tell the caller not to hangup */ return 1; } else { ast_log(LOG_DEBUG, "Neither %s nor %s are in a bridge, nothing to transfer\n",