diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 11:16:35 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 11:16:35 +0000 |
commit | f75170c496938724d523a8b934e051fe326c4637 (patch) | |
tree | a89591d253d2c02019908082838980c41222216e /src | |
parent | 8f092bda5144daeff7fd1735a1f49d50a7a1d027 (diff) | |
download | gnunet-f75170c496938724d523a8b934e051fe326c4637.tar.gz gnunet-f75170c496938724d523a8b934e051fe326c4637.zip |
missing route2 call
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index eb12d83a0..1f78ccf98 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -2316,13 +2316,13 @@ handle_dht_get (void *cls, | |||
2316 | &message_context->key, type, | 2316 | &message_context->key, type, |
2317 | &datacache_get_iterator, | 2317 | &datacache_get_iterator, |
2318 | message_context); | 2318 | message_context); |
2319 | if (results >= 1) | ||
2320 | { | ||
2321 | #if DEBUG_DHT | 2319 | #if DEBUG_DHT |
2322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2323 | "`%s:%s': Found %d results for `%s' request uid %llu\n", my_short_id, "DHT", | 2321 | "`%s:%s': Found %d results for `%s' request uid %llu\n", my_short_id, "DHT", |
2324 | results, "GET", message_context->unique_id); | 2322 | results, "GET", message_context->unique_id); |
2325 | #endif | 2323 | #endif |
2324 | if (results >= 1) | ||
2325 | { | ||
2326 | #if DEBUG_DHT_ROUTING | 2326 | #if DEBUG_DHT_ROUTING |
2327 | if ((debug_routes) && (dhtlog_handle != NULL)) | 2327 | if ((debug_routes) && (dhtlog_handle != NULL)) |
2328 | { | 2328 | { |
@@ -2342,6 +2342,7 @@ handle_dht_get (void *cls, | |||
2342 | } | 2342 | } |
2343 | else | 2343 | else |
2344 | { | 2344 | { |
2345 | |||
2345 | /* check query valid */ | 2346 | /* check query valid */ |
2346 | if (GNUNET_BLOCK_EVALUATION_REQUEST_INVALID | 2347 | if (GNUNET_BLOCK_EVALUATION_REQUEST_INVALID |
2347 | == GNUNET_BLOCK_evaluate (block_context, | 2348 | == GNUNET_BLOCK_evaluate (block_context, |
@@ -2601,11 +2602,7 @@ handle_dht_put (void *cls, | |||
2601 | return; | 2602 | return; |
2602 | 2603 | ||
2603 | data_size = ntohs (put_msg->header.size) - sizeof (struct GNUNET_DHT_PutMessage); | 2604 | data_size = ntohs (put_msg->header.size) - sizeof (struct GNUNET_DHT_PutMessage); |
2604 | #if DEBUG_DHT | 2605 | |
2605 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2606 | "`%s:%s': Received `%s' request (inserting data!), message type %d, key %s, uid %llu\n", | ||
2607 | my_short_id, "DHT", "PUT", put_type, GNUNET_h2s (&message_context->key), message_context->unique_id); | ||
2608 | #endif | ||
2609 | #if DEBUG_DHT_ROUTING | 2606 | #if DEBUG_DHT_ROUTING |
2610 | if (message_context->hop_count == 0) /* Locally initiated request */ | 2607 | if (message_context->hop_count == 0) /* Locally initiated request */ |
2611 | { | 2608 | { |
@@ -2619,7 +2616,16 @@ handle_dht_put (void *cls, | |||
2619 | #endif | 2616 | #endif |
2620 | 2617 | ||
2621 | if (message_context->closest != GNUNET_YES) | 2618 | if (message_context->closest != GNUNET_YES) |
2622 | return; | 2619 | { |
2620 | route_message2 (msg, message_context); | ||
2621 | return; | ||
2622 | } | ||
2623 | |||
2624 | #if DEBUG_DHT | ||
2625 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2626 | "`%s:%s': Received `%s' request (inserting data!), message type %d, key %s, uid %llu\n", | ||
2627 | my_short_id, "DHT", "PUT", put_type, GNUNET_h2s (&message_context->key), message_context->unique_id); | ||
2628 | #endif | ||
2623 | 2629 | ||
2624 | #if DEBUG_DHT_ROUTING | 2630 | #if DEBUG_DHT_ROUTING |
2625 | if ((debug_routes_extended) && (dhtlog_handle != NULL)) | 2631 | if ((debug_routes_extended) && (dhtlog_handle != NULL)) |
@@ -2657,7 +2663,9 @@ handle_dht_put (void *cls, | |||
2657 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2663 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2658 | "`%s:%s': %s request received, but have no datacache!\n", | 2664 | "`%s:%s': %s request received, but have no datacache!\n", |
2659 | my_short_id, "DHT", "PUT"); | 2665 | my_short_id, "DHT", "PUT"); |
2660 | route_message2 (msg, message_context); | 2666 | |
2667 | if (stop_on_closest == GNUNET_NO) | ||
2668 | route_message2 (msg, message_context); | ||
2661 | } | 2669 | } |
2662 | 2670 | ||
2663 | /** | 2671 | /** |