From 07b82267f9bbfb3edbbcfb3dd0bdeea62896054b Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 27 Apr 2015 16:44:32 +0200 Subject: [PATCH 025/257] ggatec: Deduplicate information in debug output Obtained from: ElectroBSD --- sbin/ggate/ggatec/ggatec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/ggate/ggatec/ggatec.c b/sbin/ggate/ggatec/ggatec.c index 80a653dff6ba..ed5b94915ac6 100644 --- a/sbin/ggate/ggatec/ggatec.c +++ b/sbin/ggate/ggatec/ggatec.c @@ -176,8 +176,9 @@ send_thread(void *arg __unused) pthread_kill(recvtd, SIGUSR1); break; } - g_gate_log(LOG_DEBUG, "Sent %zd bytes (offset=%llu, " - "size=%u).", data, hdr.gh_offset, hdr.gh_length); + g_gate_log(LOG_DEBUG, "Sent data packet " + "(offset=%llu, size=%u).", + hdr.gh_offset, hdr.gh_length); } } g_gate_log(LOG_DEBUG, "%s: Died.", __func__); @@ -224,16 +225,15 @@ recv_thread(void *arg __unused) ggio.gctl_length, MSG_WAITALL); if (reconnect) break; - g_gate_log(LOG_DEBUG, "Received data packet."); if (data != ggio.gctl_length) { g_gate_log(LOG_ERR, "Lost connection 4."); reconnect = 1; pthread_kill(sendtd, SIGUSR1); break; } - g_gate_log(LOG_DEBUG, "Received %d bytes (offset=%ju, " - "size=%zu).", data, (uintmax_t)hdr.gh_offset, - (size_t)hdr.gh_length); + g_gate_log(LOG_DEBUG, "Received data packet " + "(offset=%ju, size=%zu).", + (uintmax_t)hdr.gh_offset, (size_t)hdr.gh_length); } g_gate_ioctl(G_GATE_CMD_DONE, &ggio); -- 2.11.0