Refactoring GNUNET_time structs
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 27 Oct 2010 09:22:31 +0000 (09:22 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 27 Oct 2010 09:22:31 +0000 (09:22 +0000)
src/testing/test_testing_topology.c
src/testing/testing.c

index dd8a164191d37eb8268aaaa93fff7c548d122fb9..8e1fa9c33b9c57ba573b9977bd5602d7056fc1b6 100644 (file)
@@ -539,7 +539,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   struct TestMessageContext *pos = cls;
 
-  if ((pos == test_messages) && (settle_time.value > 0))
+  if ((pos == test_messages) && (settle_time.rel_value > 0))
     {
       topology_connections = 0;
       GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
@@ -670,7 +670,7 @@ topology_callback (void *cls,
                                     &send_test_messages, test_messages);
       gather_log_data();
 #else
-      if (settle_time.value > 0)
+      if (settle_time.rel_value > 0)
         {
           GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
         }
index f2150697fcb91e3a2570a2721acc369e46a1b3f1..7143ba684b20654a38c56fa18e3ce4e7814ab39d 100644 (file)
@@ -207,7 +207,7 @@ start_fsm (void *cls,
       /* confirm copying complete */
       if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
         {
-          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0)
+          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
             {
               cb = d->cb;
               d->cb = NULL;
@@ -410,7 +410,7 @@ start_fsm (void *cls,
       /* Fall through */
     case SP_HOSTKEY_CREATED:
       /* wait for topology finished */
-      if ((GNUNET_YES == d->dead) || (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0))
+      if ((GNUNET_YES == d->dead) || (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0))
         {
           cb = d->cb;
           d->cb = NULL;
@@ -522,7 +522,7 @@ start_fsm (void *cls,
     case SP_START_ARMING:
       if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
         {
-          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0)
+          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
             {
               cb = d->cb;
               d->cb = NULL;
@@ -567,7 +567,7 @@ start_fsm (void *cls,
       /* confirm copying complete */
       if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
         {
-          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0)
+          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
             {
               if (NULL != d->dead_cb)
                 d->dead_cb (d->dead_cb_cls,
@@ -647,7 +647,7 @@ start_fsm (void *cls,
       /* confirm copying complete */
       if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
         {
-          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) /* FIXME: config update should take timeout parameter! */
+          if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0) /* FIXME: config update should take timeout parameter! */
             {
               cb = d->cb;
               d->cb = NULL;
@@ -1366,7 +1366,7 @@ notify_connect_result (void *cls,
                    ctx->d2->cfg, ctx->d1, ctx->d2, NULL);
         }
     }
-  else if (remaining.value > 0)
+  else if (remaining.rel_value > 0)
     {
       if (ctx->d1core != NULL)
         {