From e51b2e31e510f088056e1da46616ed5847542446 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 6 Jul 2012 12:34:26 +0000 Subject: [PATCH] - can happen on disconnect --- src/transport/gnunet-transport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index b70c9c4b0..568cf56fa 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c @@ -355,6 +355,9 @@ transmit_data (void *cls, size_t size, void *buf) { struct GNUNET_MessageHeader *m = buf; + if ((NULL == buf) && (0 == size)) + return 0; + GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader)); GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE); m->size = ntohs (size); -- 2.25.1