fix #3275 with solution from https://gnunet.org/bugs/view.php?id=3275#c8029
[oweals/gnunet.git] / src / hostlist / hostlist-server.c
index 60ea2006a0360e54ea6fe87032e1dae27c2cbaa7..ef4debc056290c4783b2ca9ac4d9a9ed5f848eea 100644 (file)
@@ -433,7 +433,7 @@ process_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
   }
   else
   {
-    builder = GNUNET_malloc (sizeof (struct HostSet));
+    builder = GNUNET_new (struct HostSet);
   }
   GNUNET_assert (NULL != peerinfo);
   builder->pitr =
@@ -502,7 +502,7 @@ prepare_daemon (struct MHD_Daemon *daemon_handle)
   GNUNET_assert (MHD_YES == MHD_get_fdset (daemon_handle, &rs, &ws, &es, &max));
   haveto = MHD_get_timeout (daemon_handle, &timeout);
   if (haveto == MHD_YES)
-    tv.rel_value_us = (uint64_t) timeout;
+    tv.rel_value_us = (uint64_t) timeout * 1000LL;
   else
     tv = GNUNET_TIME_UNIT_FOREVER_REL;
   GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1);