diff options
author | Gabor X Toth <*@tg-x.net> | 2012-11-18 18:09:32 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2012-11-18 18:09:32 +0000 |
commit | ff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6 (patch) | |
tree | e5e96be6a02776d9dc5de475c8bca7d471a696b5 /src/transport/gnunet-service-transport_hello.c | |
parent | 33bc21c1a116c35b0bea87b09b18ce2683c7e16b (diff) | |
download | gnunet-ff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6.tar.gz gnunet-ff6b5bb3cfeeaaf353bf734c09619c4adbd02ee6.zip |
configurable hello expiration
Diffstat (limited to 'src/transport/gnunet-service-transport_hello.c')
-rw-r--r-- | src/transport/gnunet-service-transport_hello.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 870c083d2..247fbc882 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -38,6 +38,11 @@ | |||
38 | */ | 38 | */ |
39 | #define HELLO_REFRESH_PERIOD GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 6) | 39 | #define HELLO_REFRESH_PERIOD GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 6) |
40 | 40 | ||
41 | /** | ||
42 | * Hello address expiration | ||
43 | */ | ||
44 | extern struct GNUNET_TIME_Relative hello_expiration; | ||
45 | |||
41 | 46 | ||
42 | /** | 47 | /** |
43 | * Entry in linked list of network addresses for ourselves. Also | 48 | * Entry in linked list of network addresses for ourselves. Also |
@@ -159,9 +164,7 @@ refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
159 | 164 | ||
160 | hello_task = GNUNET_SCHEDULER_NO_TASK; | 165 | hello_task = GNUNET_SCHEDULER_NO_TASK; |
161 | gc.addr_pos = oal_head; | 166 | gc.addr_pos = oal_head; |
162 | gc.expiration = | 167 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); |
163 | GNUNET_TIME_relative_to_absolute | ||
164 | (GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION); | ||
165 | 168 | ||
166 | GNUNET_free (our_hello); | 169 | GNUNET_free (our_hello); |
167 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc); | 170 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc); |