From: Alan T. DeKok Date: Tue, 2 May 2017 16:24:19 +0000 (-0400) Subject: move print function to log.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1bb4f759e3aeefe45ad69445be307399c0f7052;p=thirdparty%2Ffreeradius-server.git move print function to log.c --- diff --git a/src/lib/util/log.c b/src/lib/util/log.c index 93c57b42623..7a7b5c99172 100644 --- a/src/lib/util/log.c +++ b/src/lib/util/log.c @@ -612,3 +612,20 @@ bool fr_rate_limit_enabled(void) return false; } + + +void fr_printf_log(char const *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + if ((fr_debug_lvl == 0) || !fr_log_fp) { + va_end(ap); + return; + } + + vfprintf(fr_log_fp, fmt, ap); + va_end(ap); + + return; +} diff --git a/src/lib/util/radius.c b/src/lib/util/radius.c index 8bb2af9b773..d4abd8a49d8 100644 --- a/src/lib/util/radius.c +++ b/src/lib/util/radius.c @@ -134,22 +134,6 @@ char const *fr_packet_codes[FR_MAX_PACKET_CODE] = { "IP-Address-Release", //!< 50 }; -void fr_printf_log(char const *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - if ((fr_debug_lvl == 0) || !fr_log_fp) { - va_end(ap); - return; - } - - vfprintf(fr_log_fp, fmt, ap); - va_end(ap); - - return; -} - void fr_radius_print_hex(RADIUS_PACKET const *packet) { int i;