diff options
Diffstat (limited to 'src/rps/gnunet-service-rps_custommap.c')
-rw-r--r-- | src/rps/gnunet-service-rps_custommap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c index b88de8285..158dcc43c 100644 --- a/src/rps/gnunet-service-rps_custommap.c +++ b/src/rps/gnunet-service-rps_custommap.c | |||
@@ -209,9 +209,11 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_peer_map, | |||
209 | GNUNET_CONTAINER_multihashmap32_get (c_peer_map->hash_map, | 209 | GNUNET_CONTAINER_multihashmap32_get (c_peer_map->hash_map, |
210 | CustomPeerMap_size (c_peer_map)); | 210 | CustomPeerMap_size (c_peer_map)); |
211 | GNUNET_assert (NULL != last_p); | 211 | GNUNET_assert (NULL != last_p); |
212 | last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p); | ||
213 | GNUNET_assert (NULL != last_index); | ||
214 | GNUNET_assert (CustomPeerMap_size (c_peer_map) == *last_index); | ||
212 | GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, last_p, | 215 | GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, last_p, |
213 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 216 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
214 | last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p); | ||
215 | GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index); | 217 | GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index); |
216 | *last_index = *index; | 218 | *last_index = *index; |
217 | } | 219 | } |