projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0129f7
)
- dont return expired hellos
author
Bart Polot
<bart@net.in.tum.de>
Tue, 4 Feb 2014 12:36:35 +0000
(12:36 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Tue, 4 Feb 2014 12:36:35 +0000
(12:36 +0000)
src/mesh/gnunet-service-mesh_peer.c
patch
|
blob
|
history
diff --git
a/src/mesh/gnunet-service-mesh_peer.c
b/src/mesh/gnunet-service-mesh_peer.c
index 32d2513968e05248ea195793fa3c852ca7eda8c7..244839f445a99a21b3397e5ccad4db58e857f749 100644
(file)
--- a/
src/mesh/gnunet-service-mesh_peer.c
+++ b/
src/mesh/gnunet-service-mesh_peer.c
@@
-1873,6
+1873,16
@@
GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello)
const struct GNUNET_HELLO_Message *
GMP_get_hello (struct MeshPeer *peer)
{
+ struct GNUNET_TIME_Absolute expiration;
+ struct GNUNET_TIME_Relative remaining;
+
+ expiration = GNUNET_HELLO_get_last_expiration (peer->hello);
+ remaining = GNUNET_TIME_absolute_get_remaining (expiration);
+ if (0 == remaining.rel_value_us)
+ {
+ GNUNET_free (peer->hello);
+ peer->hello = NULL;
+ }
return peer->hello;
}