From 57144feed4e6e78b7b0ff62cab958aa8c925bc80 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Tue, 12 May 2015 02:31:58 -0400 Subject: [PATCH] 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 --- main/asterisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/asterisk.c b/main/asterisk.c index ea01118ba1..ba5ac18641 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3350,7 +3350,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; } #if HAVE_WORKING_FORK /* Disable forking (-f at startup) */ -- 2.47.2