Prevent multipeermap from being reallocated
authorDavid Barksdale <amatus@amat.us>
Tue, 26 Dec 2017 15:54:24 +0000 (09:54 -0600)
committerDavid Barksdale <amatus@amat.us>
Tue, 26 Dec 2017 15:54:24 +0000 (09:54 -0600)
Grothoff points out that multipeermaps grow when 75% full.

src/cadet/gnunet-service-cadet_core.c

index cb213fc545c72fcb4c9645de706444fb28cba20f..99957d8a11af09ee2b8697fab7243c54beff568b 100644 (file)
@@ -780,7 +780,7 @@ handle_connection_create (void *cls,
   }
   /* Check for loops */
   struct GNUNET_CONTAINER_MultiPeerMap *map;
-  map = GNUNET_CONTAINER_multipeermap_create (path_length,
+  map = GNUNET_CONTAINER_multipeermap_create (path_length * 2,
                                               GNUNET_YES);
   GNUNET_assert (NULL != map);
   for (off = 0; off < path_length; off++) {