GNUNET_NO);
entry = GNUNET_malloc (sizeof (struct HostEntry));
entry->identity = *identity;
- GNUNET_CONTAINER_multihashmap_put (hostmap, &identity->hashPubKey, entry,
+ GNUNET_CONTAINER_multihashmap_put (hostmap, &entry->identity.hashPubKey, entry,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
fn = get_host_filename (identity);
entry->hello = read_host_file (fn, GNUNET_YES);
delta = GNUNET_HELLO_equals (mrg, host->hello, GNUNET_TIME_absolute_get ());
if (delta.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
{
+ /* no differences, just ignore the update */
GNUNET_free (mrg);
return;
}
&cnt);
if (0 == cnt)
{
- /* no valid addresses, don't put HELLO on disk */
+ /* no valid addresses, don't put HELLO on disk; in fact,
+ if one exists on disk, remove it */
(void) UNLINK (fn);
}
else
char *ip;
struct DirScanContext dsc;
- hostmap = GNUNET_CONTAINER_multihashmap_create (1024);
+ hostmap = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_YES);
stats = GNUNET_STATISTICS_create ("peerinfo", cfg);
notify_list = GNUNET_SERVER_notification_context_create (server, 0);
GNUNET_assert (GNUNET_OK ==