aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2019-02-25 20:36:44 +0100
committerJulius Bünger <buenger@mytum.de>2019-02-25 20:36:44 +0100
commitadbb529b74ba2cc63880c11522c09b50fef34823 (patch)
tree7536ea2eef0c2c914d4d021a28dc82bb73977339 /src/rps/gnunet-service-rps.c
parent88aa8d7bb013d1b596a3da2c7162fa55e2fc03a4 (diff)
downloadgnunet-adbb529b74ba2cc63880c11522c09b50fef34823.tar.gz
gnunet-adbb529b74ba2cc63880c11522c09b50fef34823.zip
RPS sampler: An id might be removed while a request is still pending
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index a185645ef..098c71f93 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2389,6 +2389,12 @@ hist_update (const struct GNUNET_PeerIdentity *ids,
2389 for (i = 0; i < num_peers; i++) 2389 for (i = 0; i < num_peers; i++)
2390 { 2390 {
2391 int inserted; 2391 int inserted;
2392 if (GNUNET_YES != check_peer_known (sub->peer_map, &ids[i]))
2393 {
2394 LOG (GNUNET_ERROR_TYPE_WARNING,
2395 "Peer in history update not known!\n");
2396 continue;
2397 }
2392 inserted = insert_in_view (sub, &ids[i]); 2398 inserted = insert_in_view (sub, &ids[i]);
2393 if (GNUNET_OK == inserted) 2399 if (GNUNET_OK == inserted)
2394 { 2400 {
@@ -4369,7 +4375,6 @@ do_round (void *cls)
4369 } 4375 }
4370 } 4376 }
4371 // TODO independent of that also get some peers from CADET_get_peers()? 4377 // TODO independent of that also get some peers from CADET_get_peers()?
4372 // TODO log/stat expected pushes/difference to received pushes
4373 if (CustomPeerMap_size (sub->push_map) < HISTOGRAM_FILE_SLOTS) 4378 if (CustomPeerMap_size (sub->push_map) < HISTOGRAM_FILE_SLOTS)
4374 { 4379 {
4375 sub->push_recv[CustomPeerMap_size (sub->push_map)]++; 4380 sub->push_recv[CustomPeerMap_size (sub->push_map)]++;