aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index da6812c96..0b596d021 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -91,6 +91,11 @@ struct GNUNET_ATS_SchedulingHandle *GST_ats;
91 */ 91 */
92static int connections; 92static int connections;
93 93
94/**
95 * Hello address expiration
96 */
97struct GNUNET_TIME_Relative hello_expiration;
98
94 99
95/** 100/**
96 * Transmit our HELLO message to the given (connected) neighbour. 101 * Transmit our HELLO message to the given (connected) neighbour.
@@ -114,7 +119,7 @@ transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target,
114 const struct GNUNET_MessageHeader *hello = cls; 119 const struct GNUNET_MessageHeader *hello = cls;
115 120
116 GST_neighbours_send (target, (const char *) hello, ntohs (hello->size), 121 GST_neighbours_send (target, (const char *) hello, ntohs (hello->size),
117 GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION, NULL, NULL); 122 hello_expiration, NULL, NULL);
118} 123}
119 124
120 125
@@ -675,6 +680,12 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
675 GNUNET_SCHEDULER_shutdown (); 680 GNUNET_SCHEDULER_shutdown ();
676 return; 681 return;
677 } 682 }
683 if (GNUNET_OK !=
684 GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION",
685 &hello_expiration))
686 {
687 hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
688 }
678 GST_server = server; 689 GST_server = server;
679 GNUNET_SERVER_suspend (server); 690 GNUNET_SERVER_suspend (server);
680 GST_keygen = GNUNET_CRYPTO_rsa_key_create_start (keyfile, &key_generation_cb, NULL); 691 GST_keygen = GNUNET_CRYPTO_rsa_key_create_start (keyfile, &key_generation_cb, NULL);