Revert half of the fix, as this part may have been unnecessary (related to issue...
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 27 Jun 2008 16:00:05 +0000 (16:00 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 27 Jun 2008 16:00:05 +0000 (16:00 +0000)
Requested here: http://lists.digium.com/pipermail/asterisk-dev/2008-June/033658.html

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125853 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 499df72..b2ca3cf 100644 (file)
@@ -544,11 +544,7 @@ static int local_hangup(struct ast_channel *ast)
        if (!p)
                return -1;
 
-       while (ast_mutex_trylock(&p->lock)) {
-               ast_channel_unlock(ast);
-               usleep(1);
-               ast_channel_lock(ast);
-       }
+       ast_mutex_lock(&p->lock);
 
        if (p->chan && ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) 
                ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE);