]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix locking issue (bug #4041)
authorMark Spencer <markster@digium.com>
Sun, 17 Apr 2005 03:44:19 +0000 (03:44 +0000)
committerMark Spencer <markster@digium.com>
Sun, 17 Apr 2005 03:44:19 +0000 (03:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5481 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 490c034e2a51317233a13b4c011063f7d7cf44b1..800826887c88fe5f05561ad74d727e0b529e284c 100755 (executable)
--- 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);