aboutsummaryrefslogtreecommitdiff
path: root/src/hello
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-02-05 17:24:27 +0000
committerBart Polot <bart@net.in.tum.de>2014-02-05 17:24:27 +0000
commit04a4b76995b06f134923b1cc157195c87c68c188 (patch)
tree5706ea8edcc32dbba7afdcc675749a2eb9c7951d /src/hello
parentc21fc3fd5f445c231658753a1bb87fb7d19d1796 (diff)
downloadgnunet-04a4b76995b06f134923b1cc157195c87c68c188.tar.gz
gnunet-04a4b76995b06f134923b1cc157195c87c68c188.zip
Fixed GNUNET_HELLO_get_last_expiration, as it always returned min (EPOCH, expiration times), so: EPOCH
Diffstat (limited to 'src/hello')
-rw-r--r--src/hello/hello.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 7f7706713..e964ec1a3 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -685,12 +685,12 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
685 685
686 686
687static int 687static int
688find_min_expire (void *cls, const struct GNUNET_HELLO_Address *address, 688find_max_expire (void *cls, const struct GNUNET_HELLO_Address *address,
689 struct GNUNET_TIME_Absolute expiration) 689 struct GNUNET_TIME_Absolute expiration)
690{ 690{
691 struct GNUNET_TIME_Absolute *min = cls; 691 struct GNUNET_TIME_Absolute *max = cls;
692 692
693 *min = GNUNET_TIME_absolute_min (*min, expiration); 693 *max = GNUNET_TIME_absolute_max (*max, expiration);
694 return GNUNET_OK; 694 return GNUNET_OK;
695} 695}
696 696
@@ -707,7 +707,7 @@ GNUNET_HELLO_get_last_expiration (const struct GNUNET_HELLO_Message *msg)
707 struct GNUNET_TIME_Absolute ret; 707 struct GNUNET_TIME_Absolute ret;
708 708
709 ret.abs_value_us = 0; 709 ret.abs_value_us = 0;
710 GNUNET_HELLO_iterate_addresses (msg, GNUNET_NO, &find_min_expire, &ret); 710 GNUNET_HELLO_iterate_addresses (msg, GNUNET_NO, &find_max_expire, &ret);
711 return ret; 711 return ret;
712} 712}
713 713