aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-05-14 07:47:59 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-05-14 07:47:59 +0000
commit22bacaa9944c0f68a2916abfe37a8061e9ef4480 (patch)
tree2b70adcf4cd0b441c525ec6bc5eb0c6011f4a350 /src
parent38d2cfe4fc1f9253d2938052b817921e6c27aa5b (diff)
downloadgnunet-22bacaa9944c0f68a2916abfe37a8061e9ef4480.tar.gz
gnunet-22bacaa9944c0f68a2916abfe37a8061e9ef4480.zip
- use hostip instead of hostname to avoid dependency on resolver
Diffstat (limited to 'src')
-rw-r--r--src/testbed/testbed_api_hosts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 374fee8ef..c2686ea62 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -1069,6 +1069,7 @@ helper_mst (void *cls, void *client, const struct GNUNET_MessageHeader *message)
1069 struct GNUNET_TESTBED_ControllerProc *cp = cls; 1069 struct GNUNET_TESTBED_ControllerProc *cp = cls;
1070 const struct GNUNET_TESTBED_HelperReply *msg; 1070 const struct GNUNET_TESTBED_HelperReply *msg;
1071 const char *hostname; 1071 const char *hostname;
1072 const char *hostip;
1072 char *config; 1073 char *config;
1073 uLongf config_size; 1074 uLongf config_size;
1074 uLongf xconfig_size; 1075 uLongf xconfig_size;
@@ -1096,9 +1097,12 @@ helper_mst (void *cls, void *client, const struct GNUNET_MessageHeader *message)
1096 if ((NULL == cp->host) || 1097 if ((NULL == cp->host) ||
1097 (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host)))) 1098 (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host))))
1098 hostname = "localhost"; 1099 hostname = "localhost";
1100 hostip = simple_resolve (hostname);
1101 if (NULL == hostip)
1102 hostip = "127.0.0.1";
1099 /* Change the hostname so that we can connect to it */ 1103 /* Change the hostname so that we can connect to it */
1100 GNUNET_CONFIGURATION_set_value_string (cp->host->cfg, "testbed", "hostname", 1104 GNUNET_CONFIGURATION_set_value_string (cp->host->cfg, "testbed", "hostname",
1101 hostname); 1105 hostip);
1102 cp->host->locked = GNUNET_NO; 1106 cp->host->locked = GNUNET_NO;
1103 cp->host->controller_started = GNUNET_YES; 1107 cp->host->controller_started = GNUNET_YES;
1104 cp->cb (cp->cls, cp->host->cfg, GNUNET_OK); 1108 cp->cb (cp->cls, cp->host->cfg, GNUNET_OK);