aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:22:31 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:22:31 +0000
commit6f77f858261ae4c12b3da9a715c76bf529a7509f (patch)
tree057a0bbb79c14aa55a8fa206ac41a0cea2fcff5d /src
parent71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325 (diff)
downloadgnunet-6f77f858261ae4c12b3da9a715c76bf529a7509f.tar.gz
gnunet-6f77f858261ae4c12b3da9a715c76bf529a7509f.zip
Refactoring GNUNET_time structs
Diffstat (limited to 'src')
-rw-r--r--src/testing/test_testing_topology.c4
-rw-r--r--src/testing/testing.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index dd8a16419..8e1fa9c33 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -539,7 +539,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
539{ 539{
540 struct TestMessageContext *pos = cls; 540 struct TestMessageContext *pos = cls;
541 541
542 if ((pos == test_messages) && (settle_time.value > 0)) 542 if ((pos == test_messages) && (settle_time.rel_value > 0))
543 { 543 {
544 topology_connections = 0; 544 topology_connections = 0;
545 GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); 545 GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
@@ -670,7 +670,7 @@ topology_callback (void *cls,
670 &send_test_messages, test_messages); 670 &send_test_messages, test_messages);
671 gather_log_data(); 671 gather_log_data();
672#else 672#else
673 if (settle_time.value > 0) 673 if (settle_time.rel_value > 0)
674 { 674 {
675 GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); 675 GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
676 } 676 }
diff --git a/src/testing/testing.c b/src/testing/testing.c
index f2150697f..7143ba684 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -207,7 +207,7 @@ start_fsm (void *cls,
207 /* confirm copying complete */ 207 /* confirm copying complete */
208 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code)) 208 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
209 { 209 {
210 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) 210 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
211 { 211 {
212 cb = d->cb; 212 cb = d->cb;
213 d->cb = NULL; 213 d->cb = NULL;
@@ -410,7 +410,7 @@ start_fsm (void *cls,
410 /* Fall through */ 410 /* Fall through */
411 case SP_HOSTKEY_CREATED: 411 case SP_HOSTKEY_CREATED:
412 /* wait for topology finished */ 412 /* wait for topology finished */
413 if ((GNUNET_YES == d->dead) || (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0)) 413 if ((GNUNET_YES == d->dead) || (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0))
414 { 414 {
415 cb = d->cb; 415 cb = d->cb;
416 d->cb = NULL; 416 d->cb = NULL;
@@ -522,7 +522,7 @@ start_fsm (void *cls,
522 case SP_START_ARMING: 522 case SP_START_ARMING:
523 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code)) 523 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
524 { 524 {
525 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) 525 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
526 { 526 {
527 cb = d->cb; 527 cb = d->cb;
528 d->cb = NULL; 528 d->cb = NULL;
@@ -567,7 +567,7 @@ start_fsm (void *cls,
567 /* confirm copying complete */ 567 /* confirm copying complete */
568 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code)) 568 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
569 { 569 {
570 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) 570 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0)
571 { 571 {
572 if (NULL != d->dead_cb) 572 if (NULL != d->dead_cb)
573 d->dead_cb (d->dead_cb_cls, 573 d->dead_cb (d->dead_cb_cls,
@@ -647,7 +647,7 @@ start_fsm (void *cls,
647 /* confirm copying complete */ 647 /* confirm copying complete */
648 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code)) 648 if (GNUNET_OK != GNUNET_OS_process_status (d->pid, &type, &code))
649 { 649 {
650 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) /* FIXME: config update should take timeout parameter! */ 650 if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).rel_value == 0) /* FIXME: config update should take timeout parameter! */
651 { 651 {
652 cb = d->cb; 652 cb = d->cb;
653 d->cb = NULL; 653 d->cb = NULL;
@@ -1366,7 +1366,7 @@ notify_connect_result (void *cls,
1366 ctx->d2->cfg, ctx->d1, ctx->d2, NULL); 1366 ctx->d2->cfg, ctx->d1, ctx->d2, NULL);
1367 } 1367 }
1368 } 1368 }
1369 else if (remaining.value > 0) 1369 else if (remaining.rel_value > 0)
1370 { 1370 {
1371 if (ctx->d1core != NULL) 1371 if (ctx->d1core != NULL)
1372 { 1372 {