diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-29 14:39:13 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-29 14:39:13 +0000 |
commit | 33fa9a700082513870a85b56c7359e72ed29035f (patch) | |
tree | e2a82b3861875e1bd8e6c9458669ea7f3abba2cf /src/hostlist/test_gnunet_daemon_hostlist_learning.c | |
parent | 3629a348cc13b5b586a2716fca40664c2412c19f (diff) | |
download | gnunet-33fa9a700082513870a85b56c7359e72ed29035f.tar.gz gnunet-33fa9a700082513870a85b56c7359e72ed29035f.zip |
Added configuration option to set hostname used for advertisements
Fixes problems on systems with misconfigured dns resolution for local hostname
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist_learning.c')
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 3098844e9..6510bca33 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -290,7 +290,13 @@ static int ad_arrive_handler (void *cls, | |||
290 | if ( NULL != expected_uri ) GNUNET_free ( expected_uri ); | 290 | if ( NULL != expected_uri ) GNUNET_free ( expected_uri ); |
291 | return GNUNET_SYSERR; | 291 | return GNUNET_SYSERR; |
292 | } | 292 | } |
293 | hostname = GNUNET_RESOLVER_local_fqdn_get (); | 293 | |
294 | if ( GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (adv_peer.cfg, | ||
295 | "HOSTLIST", | ||
296 | "HOSTNAME", | ||
297 | &hostname)) | ||
298 | hostname = GNUNET_RESOLVER_local_fqdn_get (); | ||
299 | |||
294 | if (NULL != hostname) | 300 | if (NULL != hostname) |
295 | { | 301 | { |
296 | size = strlen (hostname); | 302 | size = strlen (hostname); |