summaryrefslogtreecommitdiff
path: root/proto_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto_io.c')
-rw-r--r--proto_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/proto_io.c b/proto_io.c
index a903546..8f1605d 100644
--- a/proto_io.c
+++ b/proto_io.c
@@ -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;