From 01a6fc1cd88359316d54b01893d37ac1525d60a2 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 28 May 2020 12:20:07 +0200 Subject: [PATCH] Increased logging in verbose mode --- KISS.c | 1 + tncattach.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/KISS.c b/KISS.c index 20bef15..95a481f 100644 --- a/KISS.c +++ b/KISS.c @@ -28,6 +28,7 @@ void kiss_frame_received(int frame_len) { cleanup(); exit(1); } + if (verbose && !daemonize) printf("Got %d bytes from TNC, wrote %d bytes to interface\r\n", frame_len, written); } } diff --git a/tncattach.c b/tncattach.c index 1382879..c92aa83 100644 --- a/tncattach.c +++ b/tncattach.c @@ -181,7 +181,8 @@ void read_loop(void) { } } - kiss_write_frame(attached_tnc, if_buffer, if_len); + int tnc_written = kiss_write_frame(attached_tnc, if_buffer, if_len); + if (verbose && !daemonize) printf("Got %d bytes from interface, wrote %d bytes to TNC\r\n", if_len, tnc_written); } } } else {