diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-02-05 17:24:27 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-02-05 17:24:27 +0000 |
commit | 04a4b76995b06f134923b1cc157195c87c68c188 (patch) | |
tree | 5706ea8edcc32dbba7afdcc675749a2eb9c7951d /src/hello | |
parent | c21fc3fd5f445c231658753a1bb87fb7d19d1796 (diff) |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c index 7f77067132..e964ec1a33 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c @@ -685,12 +685,12 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1, static int -find_min_expire (void *cls, const struct GNUNET_HELLO_Address *address, +find_max_expire (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) { - struct GNUNET_TIME_Absolute *min = cls; + struct GNUNET_TIME_Absolute *max = cls; - *min = GNUNET_TIME_absolute_min (*min, expiration); + *max = GNUNET_TIME_absolute_max (*max, expiration); return GNUNET_OK; } @@ -707,7 +707,7 @@ GNUNET_HELLO_get_last_expiration (const struct GNUNET_HELLO_Message *msg) struct GNUNET_TIME_Absolute ret; ret.abs_value_us = 0; - GNUNET_HELLO_iterate_addresses (msg, GNUNET_NO, &find_min_expire, &ret); + GNUNET_HELLO_iterate_addresses (msg, GNUNET_NO, &find_max_expire, &ret); return ret; } |