diff options
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 11 |
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 | */ |
67 | struct GNUNET_TRANSPORT_Handle *GDS_transport_handle; | 67 | struct 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 | */ |
73 | static struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 72 | static struct GNUNET_TRANSPORT_GetHelloHandle *ghh; |
74 | 73 | ||
74 | /** | ||
75 | * Hello address expiration | ||
76 | */ | ||
77 | struct 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 (); |