[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11118 - gnunet/src/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11118 - gnunet/src/hostlist |
Date: |
Thu, 29 Apr 2010 16:39:13 +0200 |
Author: wachs
Date: 2010-04-29 16:39:13 +0200 (Thu, 29 Apr 2010)
New Revision: 11118
Modified:
gnunet/src/hostlist/hostlist-server.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
gnunet/src/hostlist/test_learning_adv_peer.conf
Log:
Added configuration option to set hostname used for advertisements
Fixes problems on systems with misconfigured dns resolution for local hostname
Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c 2010-04-29 11:51:32 UTC (rev
11117)
+++ gnunet/src/hostlist/hostlist-server.c 2010-04-29 14:39:13 UTC (rev
11118)
@@ -601,10 +601,17 @@
"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);
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c 2010-04-29
11:51:32 UTC (rev 11117)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c 2010-04-29
14:39:13 UTC (rev 11118)
@@ -290,7 +290,13 @@
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);
Modified: gnunet/src/hostlist/test_learning_adv_peer.conf
===================================================================
--- gnunet/src/hostlist/test_learning_adv_peer.conf 2010-04-29 11:51:32 UTC
(rev 11117)
+++ gnunet/src/hostlist/test_learning_adv_peer.conf 2010-04-29 14:39:13 UTC
(rev 11118)
@@ -34,6 +34,7 @@
WEAKRANDOM = YES
[hostlist]
+HOSTNAME = localhost
HTTPPORT = 12981
SERVERS = http://localhost:12981/
OPTIONS = -p -a
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11118 - gnunet/src/hostlist,
gnunet <=