diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-02-05 12:10:58 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-02-05 12:10:58 +0000 |
commit | 92e7053ff3b21507b8b385c558bfb51c45f6e365 (patch) | |
tree | e8d242982db00c92d5cbaf9bbc358a029074dd24 /src/dht/gnunet-service-dht.c | |
parent | d4c2d46ce0ebf0003b1383c4bf7e62e28abaf85f (diff) | |
download | gnunet-92e7053ff3b21507b8b385c558bfb51c45f6e365.tar.gz gnunet-92e7053ff3b21507b8b385c558bfb51c45f6e365.zip |
fix for block libraries so they don't need to understand dht struct
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index fa2b9551b..bb7b74404 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -2365,13 +2365,6 @@ datacache_get_iterator (void *cls, | |||
2365 | "`%s:%s': Received `%s' response from datacache\n", my_short_id, | 2365 | "`%s:%s': Received `%s' response from datacache\n", my_short_id, |
2366 | "DHT", "GET"); | 2366 | "DHT", "GET"); |
2367 | #endif | 2367 | #endif |
2368 | eval = GNUNET_BLOCK_evaluate (block_context, | ||
2369 | type, | ||
2370 | key, | ||
2371 | &msg_ctx->reply_bf, | ||
2372 | msg_ctx->reply_bf_mutator, | ||
2373 | msg_ctx->xquery, | ||
2374 | msg_ctx->xquery_size, data, size); | ||
2375 | 2368 | ||
2376 | put_entry = (const struct DHTPutEntry *)data; | 2369 | put_entry = (const struct DHTPutEntry *)data; |
2377 | 2370 | ||
@@ -2390,6 +2383,14 @@ datacache_get_iterator (void *cls, | |||
2390 | return GNUNET_OK; | 2383 | return GNUNET_OK; |
2391 | } | 2384 | } |
2392 | 2385 | ||
2386 | eval = GNUNET_BLOCK_evaluate (block_context, | ||
2387 | type, | ||
2388 | key, | ||
2389 | &msg_ctx->reply_bf, | ||
2390 | msg_ctx->reply_bf_mutator, | ||
2391 | msg_ctx->xquery, | ||
2392 | msg_ctx->xquery_size, &put_entry[1], put_entry->data_size); | ||
2393 | |||
2393 | switch (eval) | 2394 | switch (eval) |
2394 | { | 2395 | { |
2395 | case GNUNET_BLOCK_EVALUATION_OK_LAST: | 2396 | case GNUNET_BLOCK_EVALUATION_OK_LAST: |
@@ -2994,6 +2995,7 @@ handle_dht_put (const struct GNUNET_MessageHeader *msg, | |||
2994 | path_offset += data_size; | 2995 | path_offset += data_size; |
2995 | memcpy(path_offset, msg_ctx->path_history, msg_ctx->path_history_len * sizeof(struct GNUNET_PeerIdentity)); | 2996 | memcpy(path_offset, msg_ctx->path_history, msg_ctx->path_history_len * sizeof(struct GNUNET_PeerIdentity)); |
2996 | } | 2997 | } |
2998 | |||
2997 | ret = GNUNET_DATACACHE_put (datacache, &msg_ctx->key, put_size, | 2999 | ret = GNUNET_DATACACHE_put (datacache, &msg_ctx->key, put_size, |
2998 | (char *) put_entry, put_type, | 3000 | (char *) put_entry, put_type, |
2999 | GNUNET_TIME_absolute_ntoh | 3001 | GNUNET_TIME_absolute_ntoh |