From: Joshua Colp Date: Thu, 5 Jul 2007 13:26:02 +0000 (+0000) Subject: Actually check to make sure a PBX was started on one of the Local channels instead... X-Git-Tag: 1.2.21~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dc2b9c0f76f25a93a99facfcc7c4e4971c9d936;p=thirdparty%2Fasterisk.git Actually check to make sure a PBX was started on one of the Local channels instead of blindly assuming it was. (issue #10112 reported by makoto) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73318 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index 9dceded67b..9a0f8d61bd 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -391,10 +391,10 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) } } - p->launchedpbx = 1; - /* Start switch on sub channel */ - res = ast_pbx_start(p->chan); + if (!(res = ast_pbx_start(p->chan))) + p->launchedpbx = 1; + ast_mutex_unlock(&p->lock); return res; }