aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-07 18:19:32 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-07 18:19:32 +0000
commita60b958f984d08525b636a2c7eae564ebec54ae6 (patch)
tree6dcbbf91d734834f804b2fd9ab790244e2d60e6c /src/peerinfo
parentdecf459805cdb3f6811f979df4831bc2ce9a2858 (diff)
downloadgnunet-a60b958f984d08525b636a2c7eae564ebec54ae6.tar.gz
gnunet-a60b958f984d08525b636a2c7eae564ebec54ae6.zip
-chaning multihashmap API to allow option for avoiding key allocation
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index 4b42708ab..18f10621a 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -268,7 +268,7 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity)
268 GNUNET_NO); 268 GNUNET_NO);
269 entry = GNUNET_malloc (sizeof (struct HostEntry)); 269 entry = GNUNET_malloc (sizeof (struct HostEntry));
270 entry->identity = *identity; 270 entry->identity = *identity;
271 GNUNET_CONTAINER_multihashmap_put (hostmap, &identity->hashPubKey, entry, 271 GNUNET_CONTAINER_multihashmap_put (hostmap, &entry->identity.hashPubKey, entry,
272 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); 272 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
273 fn = get_host_filename (identity); 273 fn = get_host_filename (identity);
274 entry->hello = read_host_file (fn, GNUNET_YES); 274 entry->hello = read_host_file (fn, GNUNET_YES);
@@ -776,7 +776,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
776 char *ip; 776 char *ip;
777 struct DirScanContext dsc; 777 struct DirScanContext dsc;
778 778
779 hostmap = GNUNET_CONTAINER_multihashmap_create (1024); 779 hostmap = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_YES);
780 stats = GNUNET_STATISTICS_create ("peerinfo", cfg); 780 stats = GNUNET_STATISTICS_create ("peerinfo", cfg);
781 notify_list = GNUNET_SERVER_notification_context_create (server, 0); 781 notify_list = GNUNET_SERVER_notification_context_create (server, 0);
782 GNUNET_assert (GNUNET_OK == 782 GNUNET_assert (GNUNET_OK ==