commit 4ce8187c088aca3783f11736e5386ac8f94c3e8e
parent e7298d2198b12c2c44caa9ab76b7c67018bff4e0
Author: Bart Polot <bart@net.in.tum.de>
Date: Tue, 24 Jun 2014 01:54:19 +0000
- fix peer debug null deref
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
@@ -227,6 +227,9 @@ static struct GNUNET_TRANSPORT_Handle *transport_handle;
/***************************** DEBUG *********************************/
/******************************************************************************/
+/**
+ * FIXME
+ */
static void
queue_debug (struct CadetPeer *peer)
{
@@ -2259,8 +2262,11 @@ GCP_debug (const struct CadetPeer *p, enum GNUNET_ErrorType level)
}
LOG (level, "PPP core transmit handle %p\n", p->core_transmit);
- LOG (level, "PPP DHT GET handle\n", p->search_h);
- conns = GNUNET_CONTAINER_multihashmap_size (p->connections);
+ LOG (level, "PPP DHT GET handle %p\n", p->search_h);
+ if (NULL != p->connections)
+ conns = GNUNET_CONTAINER_multihashmap_size (p->connections);
+ else
+ conns = 0;
LOG (level, "PPP # connections over link to peer: %u\n", conns);
LOG (level, "PPP queue length: %u\n", p->queue_n);
for (q = p->queue_head; NULL != q; q = q->next)