From bd04ff175c814f1c0b602998a0c609cc46bbbb35 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 30 Apr 2010 07:48:14 +0000 Subject: [PATCH] The external dns name used can now be set in the config file By default EXTERNAL_DNS_NAME it is set to localhost to prevent the testcase from failing on systems with incorrect name resolution --- src/hostlist/hostlist-server.c | 3 +-- src/hostlist/test_gnunet_daemon_hostlist_learning.c | 2 +- src/hostlist/test_learning_adv_peer.conf | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 7ea495064..b2e939ce0 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -602,10 +602,9 @@ GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, &port)) return GNUNET_SYSERR; - if ( GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, "HOSTLIST", - "HOSTNAME", + "EXTERNAL_DNS_NAME", &hostname)) hostname = GNUNET_RESOLVER_local_fqdn_get (); diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 6510bca33..25456908a 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c @@ -293,7 +293,7 @@ static int ad_arrive_handler (void *cls, if ( GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (adv_peer.cfg, "HOSTLIST", - "HOSTNAME", + "EXTERNAL_DNS_NAME", &hostname)) hostname = GNUNET_RESOLVER_local_fqdn_get (); diff --git a/src/hostlist/test_learning_adv_peer.conf b/src/hostlist/test_learning_adv_peer.conf index 3888b9f47..fdf3095d5 100644 --- a/src/hostlist/test_learning_adv_peer.conf +++ b/src/hostlist/test_learning_adv_peer.conf @@ -1,6 +1,5 @@ [PATHS] SERVICEHOME = /tmp/test-gnunetd-hostlist-peer-2/ -DEFAULTCONFIG = test_learning_adv_peer.conf [resolver] PORT = 22964 @@ -34,7 +33,7 @@ PORT = 22970 WEAKRANDOM = YES [hostlist] -HOSTNAME = localhost +EXTERNAL_DNS_NAME = localhost HTTPPORT = 12981 SERVERS = http://localhost:12981/ OPTIONS = -p -a -- 2.25.1