From: Alan T. DeKok Date: Fri, 26 Jun 2015 02:10:43 +0000 (-0400) Subject: Print out debug condition. Fixes #1046 X-Git-Tag: release_3_0_9~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3159644296a5eb1d4a2642de53fc146aead47b1d;p=thirdparty%2Ffreeradius-server.git Print out debug condition. Fixes #1046 --- diff --git a/src/main/command.c b/src/main/command.c index 491232a1fd5..0a5f61d13ae 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -1243,7 +1243,7 @@ static int command_debug_condition(rad_listen_t *listener, int argc, char *argv[ * Disable it. */ if (argc == 0) { - talloc_free(debug_condition); + TALLOC_FREE(debug_condition); debug_condition = NULL; return CMD_OK; } @@ -1317,7 +1317,7 @@ static int command_debug_condition(rad_listen_t *listener, int argc, char *argv[ ERROR("%s", p); ERROR("%s^ %s", spaces, error); - cprintf(listener, "Parse error in condition \"%s\": %s\n", p, error); + cprintf_error(listener, "Parse error in condition \"%s\": %s\n", p, error); talloc_free(spaces); talloc_free(text); @@ -1330,7 +1330,7 @@ static int command_debug_condition(rad_listen_t *listener, int argc, char *argv[ * This is thread-safe because the condition is evaluated * in the main server thread, along with this code. */ - talloc_free(debug_condition); + TALLOC_FREE(debug_condition); debug_condition = new_condition; return CMD_OK; @@ -1341,7 +1341,7 @@ static int command_show_debug_condition(rad_listen_t *listener, { char buffer[1024]; - if (debug_condition) { + if (!debug_condition) { cprintf(listener, "\n"); return CMD_OK; }