diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-09-08 08:57:11 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-09-08 08:57:11 +0000 |
commit | e02a299c4b72e7857da811b18539aa178e0767df (patch) | |
tree | 7cbf5620d9c3706b726feb44e177fc058ec1f565 | |
parent | 94c863710f042b258047ad3c8e3f4f48154b738b (diff) | |
download | gnunet-e02a299c4b72e7857da811b18539aa178e0767df.tar.gz gnunet-e02a299c4b72e7857da811b18539aa178e0767df.zip |
committing so line numbers match
-rw-r--r-- | src/dht/gnunet-service-dht.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 5f08c8a0d..5d0560d83 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -671,6 +671,16 @@ static unsigned int stop_on_found; | |||
671 | */ | 671 | */ |
672 | static unsigned int do_find_peer; | 672 | static unsigned int do_find_peer; |
673 | 673 | ||
674 | /** | ||
675 | * Once we have stored an item in the DHT, refresh it | ||
676 | * according to our republish interval. | ||
677 | */ | ||
678 | static unsigned int do_republish; | ||
679 | |||
680 | /** | ||
681 | * Use the "real" distance metric when selecting the | ||
682 | * next routing hop. Can be less accurate. | ||
683 | */ | ||
674 | static unsigned int use_real_distance; | 684 | static unsigned int use_real_distance; |
675 | 685 | ||
676 | /** | 686 | /** |
@@ -2401,7 +2411,7 @@ handle_dht_put (void *cls, | |||
2401 | (char *) &put_msg[1], put_type, | 2411 | (char *) &put_msg[1], put_type, |
2402 | GNUNET_TIME_absolute_ntoh(put_msg->expiration)); | 2412 | GNUNET_TIME_absolute_ntoh(put_msg->expiration)); |
2403 | 2413 | ||
2404 | if (ret == GNUNET_YES) | 2414 | if ((ret == GNUNET_YES) && (do_republish == GNUNET_YES)) |
2405 | { | 2415 | { |
2406 | put_context = GNUNET_malloc(sizeof(struct RepublishContext)); | 2416 | put_context = GNUNET_malloc(sizeof(struct RepublishContext)); |
2407 | memcpy(&put_context->key, &message_context->key, sizeof(GNUNET_HashCode)); | 2417 | memcpy(&put_context->key, &message_context->key, sizeof(GNUNET_HashCode)); |
@@ -4095,6 +4105,11 @@ run (void *cls, | |||
4095 | malicious_dropper = GNUNET_YES; | 4105 | malicious_dropper = GNUNET_YES; |
4096 | } | 4106 | } |
4097 | 4107 | ||
4108 | if (GNUNET_YES == | ||
4109 | GNUNET_CONFIGURATION_get_value_yesno(cfg, "dht", | ||
4110 | "republish")) | ||
4111 | do_republish = GNUNET_NO; | ||
4112 | |||
4098 | if (GNUNET_NO == | 4113 | if (GNUNET_NO == |
4099 | GNUNET_CONFIGURATION_get_value_yesno(cfg, "dht", | 4114 | GNUNET_CONFIGURATION_get_value_yesno(cfg, "dht", |
4100 | "do_find_peer")) | 4115 | "do_find_peer")) |