*/
struct GNUNET_TRANSPORT_Handle *GDS_transport_handle;
-
/**
* Handle to get our current HELLO.
*/
static struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
+/**
+ * Hello address expiration
+ */
+struct GNUNET_TIME_Relative hello_expiration;
+
/**
* Receive the HELLO from transport service, free current and replace
const struct GNUNET_CONFIGURATION_Handle *c)
{
GDS_cfg = c;
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration))
+ {
+ hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
+ }
GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg);
GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg);
GDS_ROUTING_init ();
#define LOG_ROUTE_DETAILS_STDERR GNUNET_NO
+/**
+ * Hello address expiration
+ */
+extern struct GNUNET_TIME_Relative hello_expiration;
+
+
GNUNET_NETWORK_STRUCT_BEGIN
/**
{
GDS_NEIGHBOURS_handle_reply (sender, GNUNET_BLOCK_TYPE_DHT_HELLO,
GNUNET_TIME_relative_to_absolute
- (GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION),
+ (hello_expiration),
key, 0, NULL, 0, NULL, GDS_my_hello,
GNUNET_HELLO_size ((const struct
GNUNET_HELLO_Message *)
*/
static int connections;
+/**
+ * Hello address expiration
+ */
+struct GNUNET_TIME_Relative hello_expiration;
+
/**
* Transmit our HELLO message to the given (connected) neighbour.
const struct GNUNET_MessageHeader *hello = cls;
GST_neighbours_send (target, (const char *) hello, ntohs (hello->size),
- GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION, NULL, NULL);
+ hello_expiration, NULL, NULL);
}
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION",
+ &hello_expiration))
+ {
+ hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
+ }
GST_server = server;
GNUNET_SERVER_suspend (server);
GST_keygen = GNUNET_CRYPTO_rsa_key_create_start (keyfile, &key_generation_cb, NULL);
*/
#define HELLO_REFRESH_PERIOD GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 6)
+/**
+ * Hello address expiration
+ */
+extern struct GNUNET_TIME_Relative hello_expiration;
+
/**
* Entry in linked list of network addresses for ourselves. Also
hello_task = GNUNET_SCHEDULER_NO_TASK;
gc.addr_pos = oal_head;
- gc.expiration =
- GNUNET_TIME_relative_to_absolute
- (GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION);
+ gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
GNUNET_free (our_hello);
our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc);