Fixes problems on systems with misconfigured dns resolution for local hostname
"HTTPPORT",
&port))
return GNUNET_SYSERR;
+
+
+ if ( GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg,
+ "HOSTLIST",
+ "HOSTNAME",
+ &hostname))
+ hostname = GNUNET_RESOLVER_local_fqdn_get ();
+
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Hostlist service starts on port %llu\n"),
- port);
- hostname = GNUNET_RESOLVER_local_fqdn_get ();
+ _("Hostlist service starts on %s:%llu\n"),
+ hostname, port);
if (NULL != hostname)
{
size = strlen (hostname);
if ( NULL != expected_uri ) GNUNET_free ( expected_uri );
return GNUNET_SYSERR;
}
- hostname = GNUNET_RESOLVER_local_fqdn_get ();
+
+ if ( GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (adv_peer.cfg,
+ "HOSTLIST",
+ "HOSTNAME",
+ &hostname))
+ hostname = GNUNET_RESOLVER_local_fqdn_get ();
+
if (NULL != hostname)
{
size = strlen (hostname);
WEAKRANDOM = YES
[hostlist]
+HOSTNAME = localhost
HTTPPORT = 12981
SERVERS = http://localhost:12981/
OPTIONS = -p -a