aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-17 03:44:19 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-17 03:44:19 +0000
commit220ac9b141f5910956a51a4abc441428f6c62ae4 (patch)
tree14d709050ef6158a20947a7696e4817619676feb /pbx.c
parent0c1a64d4c1f7789e06fbba52c88482fd3b2455e9 (diff)
Fix locking issue (bug #4041)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5481 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 490c034e2..800826887 100755
--- a/pbx.c
+++ b/pbx.c
@@ -4891,6 +4891,7 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", chan->name);
if (sync > 1) {
+ ast_mutex_unlock(&chan->lock);
if (ast_pbx_run(chan)) {
ast_log(LOG_ERROR, "Unable to run PBX on %s\n", chan->name);
ast_hangup(chan);
@@ -5061,6 +5062,8 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
strncpy(tmp->data, appdata, sizeof(tmp->data) - 1);
tmp->chan = chan;
if (sync > 1) {
+ if (locked_channel)
+ ast_mutex_unlock(&chan->lock);
ast_pbx_run_app(tmp);
} else {
pthread_attr_init(&attr);