Even more changes concerning r187426. Revised where locks are placed yet once again. ast_call() should not be called with a channel locked. could cause deadlock issues with local channels.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
David Vossel 16 years ago
parent 2f048030bd
commit bd23adbc8a

@ -790,9 +790,10 @@ static void do_forward(struct chanlist *o,
ast_clear_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE);
ast_channel_unlock(in);
ast_channel_unlock(c);
if (ast_call(c, tmpchan, 0)) {
ast_channel_unlock(in);
ast_channel_unlock(c);
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
ast_clear_flag64(o, DIAL_STILLGOING);
ast_hangup(original);
@ -800,6 +801,10 @@ static void do_forward(struct chanlist *o,
c = o->chan = NULL;
num->nochan++;
} else {
ast_channel_lock(c);
while (ast_channel_trylock(in)) {
CHANNEL_DEADLOCK_AVOIDANCE(c);
}
senddialevent(in, c, stuff);
if (!ast_test_flag64(peerflags, OPT_ORIGINAL_CLID)) {
char cidname[AST_MAX_EXTENSION] = "";

Loading…
Cancel
Save