aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_dht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_dht.c')
-rw-r--r--src/cadet/gnunet-service-cadet_dht.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet_dht.c b/src/cadet/gnunet-service-cadet_dht.c
index 576753a38..9a8082339 100644
--- a/src/cadet/gnunet-service-cadet_dht.c
+++ b/src/cadet/gnunet-service-cadet_dht.c
@@ -119,7 +119,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
119 size_t size, 119 size_t size,
120 const void *data) 120 const void *data)
121{ 121{
122 const struct GNUNET_HELLO_Message *hello = data; 122 const struct GNUNET_MessageHeader *hello = data;
123 123
124 (void) trunc_peer; 124 (void) trunc_peer;
125 GCPP_try_path_from_dht (get_path, 125 GCPP_try_path_from_dht (get_path,
@@ -127,8 +127,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
127 put_path, 127 put_path,
128 put_path_length); 128 put_path_length);
129 if ((size >= sizeof(struct GNUNET_HELLO_Message)) && 129 if ((size >= sizeof(struct GNUNET_HELLO_Message)) &&
130 (ntohs (hello->header.size) == size) && 130 (ntohs (hello->size) == size))
131 (size == GNUNET_HELLO_size (hello)))
132 { 131 {
133 struct CadetPeer *peer; 132 struct CadetPeer *peer;
134 133
@@ -152,13 +151,13 @@ static void
152announce_id (void *cls) 151announce_id (void *cls)
153{ 152{
154 struct GNUNET_HashCode phash; 153 struct GNUNET_HashCode phash;
155 const struct GNUNET_HELLO_Message *hello; 154 const struct GNUNET_MessageHeader *hello;
156 size_t size; 155 size_t size;
157 struct GNUNET_TIME_Absolute expiration; 156 struct GNUNET_TIME_Absolute expiration;
158 struct GNUNET_TIME_Relative next_put; 157 struct GNUNET_TIME_Relative next_put;
159 158
160 hello = GCH_get_mine (); 159 hello = GCH_get_mine ();
161 size = (NULL != hello) ? GNUNET_HELLO_size (hello) : 0; 160 size = (NULL != hello) ? ntohs(hello->size) : 0;
162 if (0 == size) 161 if (0 == size)
163 { 162 {
164 expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), 163 expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (),
@@ -167,7 +166,7 @@ announce_id (void *cls)
167 } 166 }
168 else 167 else
169 { 168 {
170 expiration = GNUNET_HELLO_get_last_expiration (hello); 169 expiration = GNUNET_HELLO_builder_get_expiration_time (hello);
171 announce_delay = GNUNET_TIME_UNIT_SECONDS; 170 announce_delay = GNUNET_TIME_UNIT_SECONDS;
172 } 171 }
173 172