diff options
author | Corey Farrell <git@cfware.com> | 2015-05-12 02:31:58 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2015-05-12 09:37:20 -0500 |
commit | cc853dcf90dbe2f03c6f58879df86a01a85a9581 (patch) | |
tree | 3f29069015772bfcc706b55f39f7e43812af3e9a | |
parent | 58d0db347eaccdb60538c73b7b6f8e035539a69e (diff) |
Fix processing of asterisk.conf debug=yes.
The code which reads asterisk.conf supports processing the debug
option with ast_true, but ast_true returns -1. This causes debug
to still be off, convert to 1 so debug will be on as requested.
ASTERISK-25042
Reported by: Corey Farrell
Change-Id: I3c898b7d082d914b057e111b9357fde46bad9ed6
-rw-r--r-- | main/asterisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index d48546eec..f4a163b8a 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3498,7 +3498,7 @@ static void ast_readconfig(void) } else if (!strcasecmp(v->name, "debug")) { option_debug = 0; if (sscanf(v->value, "%30d", &option_debug) != 1) { - option_debug = ast_true(v->value); + option_debug = ast_true(v->value) ? 1 : 0; } } else if (!strcasecmp(v->name, "refdebug")) { ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_REF_DEBUG); |