aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns_resolver.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-29 10:56:15 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-29 10:56:15 +0200
commitce2864cfaa27e55096b480bf35db5f8cee2a5e7e (patch)
treebe47c017d1467870000aa1a507eab3c995304179 /src/gns/gnunet-service-gns_resolver.c
parent823215c974ccb1ef3cad9eb1082999cd1b910416 (diff)
downloadgnunet-ce2864cfaa27e55096b480bf35db5f8cee2a5e7e.tar.gz
gnunet-ce2864cfaa27e55096b480bf35db5f8cee2a5e7e.zip
add option to disable namecache, add velocity calculation and delay correction to zonemaster, fix some ftbfs from recent NAMESTORE API change
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 745a2f3bd..92e03bc69 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -501,7 +501,7 @@ static struct CacheOps *co_tail;
501/** 501/**
502 * Use namecache 502 * Use namecache
503 */ 503 */
504static int use_cache; 504static int disable_cache;
505 505
506/** 506/**
507 * Global configuration. 507 * Global configuration.
@@ -2478,7 +2478,7 @@ recursive_gns_resolution_namecache (struct GNS_ResolverHandle *rh)
2478 GNUNET_GNSRECORD_query_from_public_key (&ac->authority_info.gns_authority, 2478 GNUNET_GNSRECORD_query_from_public_key (&ac->authority_info.gns_authority,
2479 ac->label, 2479 ac->label,
2480 &query); 2480 &query);
2481 if (GNUNET_YES == use_cache) 2481 if (GNUNET_YES != disable_cache)
2482 { 2482 {
2483 rh->namecache_qe 2483 rh->namecache_qe
2484 = GNUNET_NAMECACHE_lookup_block (namecache_handle, 2484 = GNUNET_NAMECACHE_lookup_block (namecache_handle,
@@ -2489,7 +2489,8 @@ recursive_gns_resolution_namecache (struct GNS_ResolverHandle *rh)
2489 } 2489 }
2490 else 2490 else
2491 { 2491 {
2492 start_dht_request (rh, &query); 2492 start_dht_request (rh,
2493 &query);
2493 } 2494 }
2494} 2495}
2495 2496
@@ -2816,13 +2817,11 @@ GNS_resolver_init (struct GNUNET_NAMECACHE_Handle *nc,
2816 dht_lookup_heap = 2817 dht_lookup_heap =
2817 GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); 2818 GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
2818 max_allowed_background_queries = max_bg_queries; 2819 max_allowed_background_queries = max_bg_queries;
2819 if (GNUNET_SYSERR == (use_cache = 2820 disable_cache = GNUNET_CONFIGURATION_get_value_yesno (cfg,
2820 GNUNET_CONFIGURATION_get_value_yesno (c, 2821 "namecache",
2821 "gns", 2822 "DISABLE");
2822 "USE_CACHE"))) 2823 if (GNUNET_YES == disable_cache)
2823 use_cache = GNUNET_YES; 2824 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
2824 if (GNUNET_NO == use_cache)
2825 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
2826 "Namecache disabled\n"); 2825 "Namecache disabled\n");
2827 vpn_handle = GNUNET_VPN_connect (cfg); 2826 vpn_handle = GNUNET_VPN_connect (cfg);
2828} 2827}