From 4af6ba201b444853becae1981f07f2ae021397ec Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 26 Oct 2016 04:20:57 +0000 Subject: [PATCH] - improve logging of CONN_ACK --- src/cadet/gnunet-service-cadet_connection.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 32ce49fc8..37d55a5b0 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c @@ -1029,16 +1029,17 @@ send_connection_ack (struct CadetConnection *c, int fwd) { struct GNUNET_CADET_ConnectionACK msg; struct CadetTunnel *t; - size_t size = sizeof (struct GNUNET_CADET_ConnectionACK); + const uint16_t size = sizeof (struct GNUNET_CADET_ConnectionACK); + const uint16_t type = GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK; GCC_check_connections (); t = c->t; LOG (GNUNET_ERROR_TYPE_INFO, - "==> { C %s ACK} %19s on conn %s (%p) %s [%5u]\n", - GC_f2s (!fwd), "", GCC_2s (c), c, GC_f2s (fwd), size); + "==> %s ({ C %s ACK} 0) on conn %s (%p) %s [%5u]\n", + GC_m2s (type), GC_f2s (!fwd), GCC_2s (c), c, GC_f2s (fwd), size); - msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionACK)); - msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK); + msg.header.size = htons (size); + msg.header.type = htons (type); msg.reserved = htonl (0); msg.cid = c->id; -- 2.25.1