diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-10 14:37:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-10 14:37:05 +0000 |
commit | aa58ab7ecb34a3e40340316b62daacb147467310 (patch) | |
tree | f42bb51f36a36c04f8c2096c734d8bfa52bed3c8 /src/dv/dv_api.c | |
parent | 4aa4a289f9cc316333b8de062997891e8b32a24c (diff) |
-do not crash if we get NACKs or ACKs for disconnected peers
Diffstat (limited to 'src/dv/dv_api.c')
-rw-r--r-- | src/dv/dv_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index eb86b7aec7..b93fa79fb3 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)) |