aboutsummaryrefslogtreecommitdiff
path: root/src/hello
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:48:46 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:48:46 +0000
commitba9ef31948175e08469403cfd8840db7efe5886f (patch)
treeafff54135d797e25c3c1819e67e8be0adc7f9ec1 /src/hello
parent92ea81543438aebee77ceec02800da3e4da6a421 (diff)
downloadgnunet-ba9ef31948175e08469403cfd8840db7efe5886f.tar.gz
gnunet-ba9ef31948175e08469403cfd8840db7efe5886f.zip
Refactoring gnunet time
Diffstat (limited to 'src/hello')
-rw-r--r--src/hello/hello.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 14a9e58be..9affad3c1 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -329,8 +329,8 @@ copy_latest (void *cls,
329 ec.tname = tname; 329 ec.tname = tname;
330 GNUNET_HELLO_iterate_addresses (mc->other, GNUNET_NO, &get_match_exp, &ec); 330 GNUNET_HELLO_iterate_addresses (mc->other, GNUNET_NO, &get_match_exp, &ec);
331 if ( (ec.found == GNUNET_NO) || 331 if ( (ec.found == GNUNET_NO) ||
332 (ec.expiration.value < expiration.value) || 332 (ec.expiration.abs_value < expiration.abs_value) ||
333 ( (ec.expiration.value == expiration.value) && 333 ( (ec.expiration.abs_value == expiration.abs_value) &&
334 (mc->take_equal == GNUNET_YES) ) ) 334 (mc->take_equal == GNUNET_YES) ) )
335 { 335 {
336 mc->ret += GNUNET_HELLO_add_address (tname, 336 mc->ret += GNUNET_HELLO_add_address (tname,
@@ -413,8 +413,8 @@ delta_match (void *cls,
413 GNUNET_HELLO_iterate_addresses (dc->old_hello, 413 GNUNET_HELLO_iterate_addresses (dc->old_hello,
414 GNUNET_NO, &get_match_exp, &ec); 414 GNUNET_NO, &get_match_exp, &ec);
415 if ((ec.found == GNUNET_YES) && 415 if ((ec.found == GNUNET_YES) &&
416 ((ec.expiration.value > expiration.value) || 416 ((ec.expiration.abs_value > expiration.abs_value) ||
417 (ec.expiration.value >= dc->expiration_limit.value))) 417 (ec.expiration.abs_value >= dc->expiration_limit.abs_value)))
418 return GNUNET_YES; /* skip */ 418 return GNUNET_YES; /* skip */
419 ret = dc->it (dc->it_cls, tname, expiration, addr, addrlen); 419 ret = dc->it (dc->it_cls, tname, expiration, addr, addrlen);
420 return ret; 420 return ret;
@@ -560,7 +560,7 @@ find_other_matching (void *cls,
560{ 560{
561 struct EqualsContext *ec = cls; 561 struct EqualsContext *ec = cls;
562 562
563 if (expiration.value < ec->expiration_limit.value) 563 if (expiration.abs_value < ec->expiration_limit.abs_value)
564 return GNUNET_YES; 564 return GNUNET_YES;
565 if ( (addrlen == ec->addrlen) && 565 if ( (addrlen == ec->addrlen) &&
566 (0 == strcmp (tname, 566 (0 == strcmp (tname,
@@ -570,7 +570,7 @@ find_other_matching (void *cls,
570 addrlen)) ) 570 addrlen)) )
571 { 571 {
572 ec->found = GNUNET_YES; 572 ec->found = GNUNET_YES;
573 if (expiration.value < ec->expiration.value) 573 if (expiration.abs_value < ec->expiration.abs_value)
574 ec->result = GNUNET_TIME_absolute_min (expiration, 574 ec->result = GNUNET_TIME_absolute_min (expiration,
575 ec->result); 575 ec->result);
576 return GNUNET_SYSERR; 576 return GNUNET_SYSERR;
@@ -587,7 +587,7 @@ find_matching (void *cls,
587{ 587{
588 struct EqualsContext *ec = cls; 588 struct EqualsContext *ec = cls;
589 589
590 if (expiration.value < ec->expiration_limit.value) 590 if (expiration.abs_value < ec->expiration_limit.abs_value)
591 return GNUNET_YES; 591 return GNUNET_YES;
592 ec->tname = tname; 592 ec->tname = tname;
593 ec->expiration = expiration; 593 ec->expiration = expiration;
@@ -642,8 +642,8 @@ GNUNET_HELLO_equals (const struct
642 GNUNET_NO, 642 GNUNET_NO,
643 &find_matching, 643 &find_matching,
644 &ec); 644 &ec);
645 if (ec.result.value == 645 if (ec.result.abs_value ==
646 GNUNET_TIME_UNIT_ZERO.value) 646 GNUNET_TIME_UNIT_ZERO.rel_value)
647 return ec.result; 647 return ec.result;
648 ec.h2 = h1; 648 ec.h2 = h1;
649 GNUNET_HELLO_iterate_addresses (h2, 649 GNUNET_HELLO_iterate_addresses (h2,