diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-10 17:32:25 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-10 17:32:25 +0000 |
commit | 250420f44fb9808e47dcbca76d2eec3ed4cf9243 (patch) | |
tree | 8f2c662a67d8c52338e1795f8164a5f1faf62dac /apps/app_dial.c | |
parent | a7cb278b85f434d0992b7faa22093fd923375556 (diff) |
Make sure tc is unlocked before calling ast_call since calling a Local
channel could result in a deadlock.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187770 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 21ba4b805..573e4c54c 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1916,6 +1916,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags else ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten)); + ast_channel_unlock(tc); res = ast_call(tc, numsubst, 0); /* Place the call, but don't wait on the answer */ /* Save the info in cdr's that we called them */ @@ -1931,7 +1932,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags chan->hangupcause = tc->hangupcause; } ast_channel_unlock(chan); - ast_channel_unlock(tc); ast_hangup(tc); tc = NULL; ast_free(tmp); @@ -1941,7 +1941,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags senddialevent(chan, tc, numsubst); ast_verb(3, "Called %s\n", numsubst); ast_channel_unlock(chan); - ast_channel_unlock(tc); if (!ast_test_flag64(peerflags, OPT_ORIGINAL_CLID)) { ast_set_callerid(tc, tmpexten, get_cid_name(cidname, sizeof(cidname), chan), NULL); } |