diff options
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index ff462ad4b..6b9ca55b6 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -464,10 +464,10 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) } } - ast_set_flag(p, LOCAL_LAUNCHED_PBX); - /* Start switch on sub channel */ - res = ast_pbx_start(p->chan); + if (!(res = ast_pbx_start(p->chan))) + ast_set_flag(p, LOCAL_LAUNCHED_PBX); + ast_mutex_unlock(&p->lock); return res; } |