diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-02 10:17:38 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-02 10:17:38 +0100 |
commit | b1f8b32c7bf518e10f6c87bd0479b5110a7fec26 (patch) | |
tree | 6bd0063af77fd0d2f0c29d155e5b9a96541299a7 /src/dht/gnunet-service-dht_routing.c | |
parent | b10aed674f795793f20162f45cd8a1707b308718 (diff) | |
download | gnunet-b1f8b32c7bf518e10f6c87bd0479b5110a7fec26.tar.gz gnunet-b1f8b32c7bf518e10f6c87bd0479b5110a7fec26.zip |
have sanity checks for DHT path construction
Diffstat (limited to 'src/dht/gnunet-service-dht_routing.c')
-rw-r--r-- | src/dht/gnunet-service-dht_routing.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c index 978c46d73..71240a503 100644 --- a/src/dht/gnunet-service-dht_routing.c +++ b/src/dht/gnunet-service-dht_routing.c | |||
@@ -128,17 +128,17 @@ struct ProcessContext | |||
128 | struct GNUNET_TIME_Absolute expiration_time; | 128 | struct GNUNET_TIME_Absolute expiration_time; |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Number of entries in 'put_path'. | 131 | * Number of entries in @e put_path. |
132 | */ | 132 | */ |
133 | unsigned int put_path_length; | 133 | unsigned int put_path_length; |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Number of entries in 'get_path'. | 136 | * Number of entries in @e get_path. |
137 | */ | 137 | */ |
138 | unsigned int get_path_length; | 138 | unsigned int get_path_length; |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * Number of bytes in 'data'. | 141 | * Number of bytes in @e data. |
142 | */ | 142 | */ |
143 | size_t data_size; | 143 | size_t data_size; |
144 | 144 | ||
@@ -223,8 +223,13 @@ process (void *cls, | |||
223 | gettext_noop | 223 | gettext_noop |
224 | ("# Good REPLIES matched against routing table"), | 224 | ("# Good REPLIES matched against routing table"), |
225 | 1, GNUNET_NO); | 225 | 1, GNUNET_NO); |
226 | GDS_NEIGHBOURS_handle_reply (&rr->peer, pc->type, pc->expiration_time, key, | 226 | GDS_NEIGHBOURS_handle_reply (&rr->peer, |
227 | ppl, pc->put_path, gpl, pc->get_path, pc->data, | 227 | pc->type, |
228 | pc->expiration_time, | ||
229 | key, | ||
230 | ppl, pc->put_path, | ||
231 | gpl, pc->get_path, | ||
232 | pc->data, | ||
228 | pc->data_size); | 233 | pc->data_size); |
229 | break; | 234 | break; |
230 | case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE: | 235 | case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE: |
@@ -275,9 +280,9 @@ process (void *cls, | |||
275 | * @param type type of the block | 280 | * @param type type of the block |
276 | * @param expiration_time when does the content expire | 281 | * @param expiration_time when does the content expire |
277 | * @param key key for the content | 282 | * @param key key for the content |
278 | * @param put_path_length number of entries in put_path | 283 | * @param put_path_length number of entries in @a put_path |
279 | * @param put_path peers the original PUT traversed (if tracked) | 284 | * @param put_path peers the original PUT traversed (if tracked) |
280 | * @param get_path_length number of entries in get_path | 285 | * @param get_path_length number of entries in @a get_path |
281 | * @param get_path peers this reply has traversed so far (if tracked) | 286 | * @param get_path peers this reply has traversed so far (if tracked) |
282 | * @param data payload of the reply | 287 | * @param data payload of the reply |
283 | * @param data_size number of bytes in data | 288 | * @param data_size number of bytes in data |