diff options
Diffstat (limited to 'proto_io.c')
-rw-r--r-- | proto_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ /* SPDX-License-Identifier: Unlicense */ +#include "debug.h" #include "proto_io.h" #include <arpa/inet.h> @@ -39,7 +40,7 @@ int ReceiveFrame(int fd, struct frame *frame) frame->addr = addr; frame->port = port; } - if (LOG_TRACE) { + if (g_log_level >= LOG_LEVEL_TRACE) { uint8_t const a0 = addr >> 24; uint8_t const a1 = addr >> 16; uint8_t const a2 = addr >> 8; @@ -57,7 +58,7 @@ int SendFrame(int const fd, struct frame const *const frame) .sin_port = htons(frame->port), .sin_addr.s_addr = htonl(frame->addr), }; - if (LOG_TRACE) { + if (g_log_level >= LOG_LEVEL_TRACE) { uint32_t const addr = frame->addr; uint16_t const port = frame->port; uint8_t const a0 = addr >> 24; |