From: Nathan S. Evans Date: Wed, 18 Aug 2010 08:36:07 +0000 (+0000) Subject: print correct size X-Git-Tag: initial-import-from-subversion-38251~20664 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ffc7a5d7b067091fc41609e39a6638e5791dcc2;p=oweals%2Fgnunet.git print correct size --- diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 225c4f336..7e08ebd4b 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -129,6 +129,7 @@ stop_arm (struct PeerContext *p) static void end_badly () { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n"); GNUNET_break (0); GNUNET_TRANSPORT_disconnect (p1.th); GNUNET_TRANSPORT_disconnect (p2.th); @@ -166,10 +167,11 @@ notify_ready (void *cls, size_t size, void *buf) struct GNUNET_MessageHeader *hdr; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Transmitting message to peer (%p) - %u!\n", cls, size); + "Transmitting message to peer (%p) - %u!\n", cls, sizeof (struct GNUNET_MessageHeader)); GNUNET_assert (size >= 256); GNUNET_assert (ok == 4); OKPP; + if (buf != NULL) { hdr = buf;