aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2012-11-18 18:09:32 +0000
committerGabor X Toth <*@tg-x.net>2012-11-18 18:09:32 +0000
commitff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6 (patch)
treee5e96be6a02776d9dc5de475c8bca7d471a696b5 /src/dht/gnunet-service-dht.c
parent33bc21c1a116c35b0bea87b09b18ce2683c7e16b (diff)
downloadgnunet-ff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6.tar.gz
gnunet-ff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6.zip
configurable hello expiration
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 72575acae..5efa9ddc6 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -66,12 +66,16 @@ struct GNUNET_MessageHeader *GDS_my_hello;
66 */ 66 */
67struct GNUNET_TRANSPORT_Handle *GDS_transport_handle; 67struct GNUNET_TRANSPORT_Handle *GDS_transport_handle;
68 68
69
70/** 69/**
71 * Handle to get our current HELLO. 70 * Handle to get our current HELLO.
72 */ 71 */
73static struct GNUNET_TRANSPORT_GetHelloHandle *ghh; 72static struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
74 73
74/**
75 * Hello address expiration
76 */
77struct GNUNET_TIME_Relative hello_expiration;
78
75 79
76/** 80/**
77 * Receive the HELLO from transport service, free current and replace 81 * Receive the HELLO from transport service, free current and replace
@@ -141,6 +145,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
141 const struct GNUNET_CONFIGURATION_Handle *c) 145 const struct GNUNET_CONFIGURATION_Handle *c)
142{ 146{
143 GDS_cfg = c; 147 GDS_cfg = c;
148 if (GNUNET_OK !=
149 GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration))
150 {
151 hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
152 }
144 GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg); 153 GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg);
145 GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg); 154 GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg);
146 GDS_ROUTING_init (); 155 GDS_ROUTING_init ();