diff options
Diffstat (limited to 'src/dht/gnunet-service-dht_datacache.c')
-rw-r--r-- | src/dht/gnunet-service-dht_datacache.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c index 91bdfe3da..be0a6db81 100644 --- a/src/dht/gnunet-service-dht_datacache.c +++ b/src/dht/gnunet-service-dht_datacache.c | |||
@@ -126,7 +126,7 @@ struct GetRequestContext | |||
126 | /** | 126 | /** |
127 | * Return value to give back. | 127 | * Return value to give back. |
128 | */ | 128 | */ |
129 | enum GNUNET_BLOCK_EvaluationResult eval; | 129 | enum GNUNET_BLOCK_ReplyEvaluationResult eval; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | 132 | ||
@@ -204,13 +204,6 @@ datacache_get_iterator (void *cls, | |||
204 | 1, | 204 | 1, |
205 | GNUNET_NO); | 205 | GNUNET_NO); |
206 | break; | 206 | break; |
207 | case GNUNET_BLOCK_REPLY_INVALID: | ||
208 | /* maybe it expired? */ | ||
209 | GNUNET_STATISTICS_update (GDS_stats, | ||
210 | "# Invalid RESULTS found in datacache", | ||
211 | 1, | ||
212 | GNUNET_NO); | ||
213 | break; | ||
214 | case GNUNET_BLOCK_REPLY_IRRELEVANT: | 207 | case GNUNET_BLOCK_REPLY_IRRELEVANT: |
215 | GNUNET_STATISTICS_update (GDS_stats, | 208 | GNUNET_STATISTICS_update (GDS_stats, |
216 | "# Irrelevant RESULTS found in datacache", | 209 | "# Irrelevant RESULTS found in datacache", |
@@ -222,7 +215,7 @@ datacache_get_iterator (void *cls, | |||
222 | } | 215 | } |
223 | 216 | ||
224 | 217 | ||
225 | enum GNUNET_BLOCK_EvaluationResult | 218 | enum GNUNET_BLOCK_ReplyEvaluationResult |
226 | GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *key, | 219 | GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *key, |
227 | enum GNUNET_BLOCK_Type type, | 220 | enum GNUNET_BLOCK_Type type, |
228 | const void *xquery, | 221 | const void *xquery, |
@@ -232,7 +225,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *key, | |||
232 | void *gc_cls) | 225 | void *gc_cls) |
233 | { | 226 | { |
234 | struct GetRequestContext ctx = { | 227 | struct GetRequestContext ctx = { |
235 | .eval = GNUNET_BLOCK_EVALUATION_REQUEST_VALID, | 228 | .eval = GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED, |
236 | .key = *key, | 229 | .key = *key, |
237 | .xquery = xquery, | 230 | .xquery = xquery, |
238 | .xquery_size = xquery_size, | 231 | .xquery_size = xquery_size, |
@@ -243,7 +236,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *key, | |||
243 | unsigned int r; | 236 | unsigned int r; |
244 | 237 | ||
245 | if (NULL == datacache) | 238 | if (NULL == datacache) |
246 | return GNUNET_BLOCK_EVALUATION_REQUEST_VALID; | 239 | return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED; |
247 | GNUNET_STATISTICS_update (GDS_stats, | 240 | GNUNET_STATISTICS_update (GDS_stats, |
248 | "# GET requests given to datacache", | 241 | "# GET requests given to datacache", |
249 | 1, | 242 | 1, |
@@ -262,7 +255,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *key, | |||
262 | } | 255 | } |
263 | 256 | ||
264 | 257 | ||
265 | enum GNUNET_BLOCK_EvaluationResult | 258 | enum GNUNET_BLOCK_ReplyEvaluationResult |
266 | GDS_DATACACHE_get_closest (const struct GNUNET_HashCode *key, | 259 | GDS_DATACACHE_get_closest (const struct GNUNET_HashCode *key, |
267 | enum GNUNET_BLOCK_Type type, | 260 | enum GNUNET_BLOCK_Type type, |
268 | const void *xquery, | 261 | const void *xquery, |
@@ -272,7 +265,7 @@ GDS_DATACACHE_get_closest (const struct GNUNET_HashCode *key, | |||
272 | void *cb_cls) | 265 | void *cb_cls) |
273 | { | 266 | { |
274 | struct GetRequestContext ctx = { | 267 | struct GetRequestContext ctx = { |
275 | .eval = GNUNET_BLOCK_EVALUATION_REQUEST_VALID, | 268 | .eval = GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED, |
276 | .key = *key, | 269 | .key = *key, |
277 | .xquery = xquery, | 270 | .xquery = xquery, |
278 | .xquery_size = xquery_size, | 271 | .xquery_size = xquery_size, |
@@ -283,7 +276,7 @@ GDS_DATACACHE_get_closest (const struct GNUNET_HashCode *key, | |||
283 | unsigned int r; | 276 | unsigned int r; |
284 | 277 | ||
285 | if (NULL == datacache) | 278 | if (NULL == datacache) |
286 | return GNUNET_BLOCK_EVALUATION_REQUEST_VALID; | 279 | return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED; |
287 | GNUNET_STATISTICS_update (GDS_stats, | 280 | GNUNET_STATISTICS_update (GDS_stats, |
288 | "# GET closest requests given to datacache", | 281 | "# GET closest requests given to datacache", |
289 | 1, | 282 | 1, |