diff options
author | Alec L Davis <sivad.a@paradise.net.nz> | 2011-09-07 07:48:25 +0000 |
---|---|---|
committer | Alec L Davis <sivad.a@paradise.net.nz> | 2011-09-07 07:48:25 +0000 |
commit | 7b63ad3afbe00a3f578e1e6efd3335083aeff6ad (patch) | |
tree | f1ba50dde55162a4ebe74450d2ada7f34ebc58db /main | |
parent | f03bccdb4dcc1893acd2139f5a420c80ebdbecea (diff) |
Merged revisions 334617 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r334617 | alecdavis | 2011-09-07 19:45:00 +1200 (Wed, 07 Sep 2011) | 17 lines
Merged revisions 334616 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r334616 | alecdavis | 2011-09-07 19:33:39 +1200 (Wed, 07 Sep 2011) | 10 lines
Prevent segfault if call arrives before Asterisk is fully booted.
Prevent ast_pbx_start and ast_run_start from starting a new thread unless asterisk
is fully booted.
alecdavis (license 585)
Tested by: alecdavis
Review: https://reviewboard.asterisk.org/r/1407/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/pbx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 8204cb500..714085195 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5358,6 +5358,11 @@ enum ast_pbx_result ast_pbx_start(struct ast_channel *c) return AST_PBX_FAILED; } + if (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) { + ast_log(LOG_WARNING, "PBX requires Asterisk to be fully booted\n"); + return AST_PBX_FAILED; + } + if (increase_call_count(c)) return AST_PBX_CALL_LIMIT; @@ -5375,6 +5380,11 @@ enum ast_pbx_result ast_pbx_run_args(struct ast_channel *c, struct ast_pbx_args { enum ast_pbx_result res = AST_PBX_SUCCESS; + if (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) { + ast_log(LOG_WARNING, "PBX requires Asterisk to be fully booted\n"); + return AST_PBX_FAILED; + } + if (increase_call_count(c)) { return AST_PBX_CALL_LIMIT; } |