From aa58ab7ecb34a3e40340316b62daacb147467310 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 10 Dec 2013 14:37:05 +0000 Subject: [PATCH] -do not crash if we get NACKs or ACKs for disconnected peers --- src/dv/dv_api.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index eb86b7aec..b93fa79fb 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c @@ -434,6 +434,12 @@ handle_message_receipt (void *cls, ack = (const struct GNUNET_DV_AckMessage *) msg; peer = GNUNET_CONTAINER_multipeermap_get (sh->peers, &ack->target); + if (NULL == peer) + { + GNUNET_break (0); + reconnect (sh); + return; + } for (th = peer->head; NULL != th; th = th->next) { if (th->uid != ntohl (ack->uid)) -- 2.25.1