- docs
[oweals/gnunet.git] / src / testbed / testbed_api_hosts.c
index 2593f5ff80383956f9dc8bfb0a013df3715bcd40..cd805dca1af7a04b6331bb6d9422406ef13b9bc8 100644 (file)
@@ -1086,8 +1086,7 @@ helper_mst (void *cls, void *client, const struct GNUNET_MessageHeader *message)
   GNUNET_assert (GNUNET_CONFIGURATION_deserialize
                  (cp->host->cfg, config, config_size, GNUNET_NO));
   GNUNET_free (config);
-  if ((NULL == cp->host) ||
-      (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host))))
+  if (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host)))
     hostname = "localhost";
   /* Change the hostname so that we can connect to it */
   GNUNET_CONFIGURATION_set_value_string (cp->host->cfg, "testbed", "hostname",
@@ -1696,12 +1695,12 @@ decide_npoc (struct GNUNET_TESTBED_Host *h)
   }
   GNUNET_assert (nvals >= h->num_parallel_connects);
   avg = GNUNET_TIME_relative_divide (avg, nvals);
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value != avg.rel_value);
-  sd = GNUNET_TESTBED_SD_deviation_factor_ (h->poc_sd, (unsigned int) avg.rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != avg.rel_value_us);
+  sd = GNUNET_TESTBED_SD_deviation_factor_ (h->poc_sd, (unsigned int) avg.rel_value_us);
   if ( (sd <= 5) ||
        (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
                                       h->num_parallel_connects)) )
-    GNUNET_TESTBED_SD_add_data_ (h->poc_sd, (unsigned int) avg.rel_value);
+    GNUNET_TESTBED_SD_add_data_ (h->poc_sd, (unsigned int) avg.rel_value_us);
   if (GNUNET_SYSERR == sd)
   {
     GNUNET_TESTBED_set_num_parallel_overlay_connects_ (h,
@@ -1799,7 +1798,7 @@ GNUNET_TESTBED_update_time_slot_ (struct GNUNET_TESTBED_Host *h,
     return;
   slot = &h->tslots[index];
   slot->nvals++;
-  if (GNUNET_TIME_UNIT_ZERO.rel_value == slot->time.rel_value)
+  if (GNUNET_TIME_UNIT_ZERO.rel_value_us == slot->time.rel_value_us)
   {
     slot->time = time;
     h->tslots_filled++;