gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r16193 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r16193 - gnunet/src/testing
Date: Tue, 26 Jul 2011 12:33:53 +0200

Author: nevans
Date: 2011-07-26 12:33:53 +0200 (Tue, 26 Jul 2011)
New Revision: 16193

Modified:
   gnunet/src/testing/testing_group.c
Log:
fixes for remote peer testing

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2011-07-26 09:33:12 UTC (rev 16192)
+++ gnunet/src/testing/testing_group.c  2011-07-26 10:33:53 UTC (rev 16193)
@@ -1453,10 +1453,14 @@
   if (hostname != NULL)
     {
       GNUNET_asprintf (&allowed_hosts, "%s; 127.0.0.1;", hostname);
-      GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-udp", "BINDTO",
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "BINDTO",
                                              hostname);
-      GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-tcp", "BINDTO",
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "INTERNAL_ADDRESS",
                                              hostname);
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "EXTERNAL_ADDRESS",
+                                             hostname);
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "disablev6", "BINDTO",
+                                             "YES");
       GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-tcp", 
"USE_LOCALADDR",
                                              "YES");
       GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-udp", 
"USE_LOCALADDR",
@@ -1467,14 +1471,18 @@
     }
   else
     {
-      GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-tcp", "BINDTO",
-                                             "127.0.0.1");
-      GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-udp", "BINDTO",
-                                             "127.0.0.1");
       GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-tcp", 
"USE_LOCALADDR",
                                              "YES");
       GNUNET_CONFIGURATION_set_value_string (uc.ret, "transport-udp", 
"USE_LOCALADDR",
                                              "YES");
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "BINDTO",
+                                             "127.0.0.1");
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "INTERNAL_ADDRESS",
+                                             "127.0.0.1");
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "nat", "EXTERNAL_ADDRESS",
+                                             "127.0.0.1");
+      GNUNET_CONFIGURATION_set_value_string (uc.ret, "disablev6", "BINDTO",
+                                             "YES");
     }
 
   *port = (uint16_t) uc.nport;
@@ -6114,7 +6122,30 @@
     {
       for (off = 0; off < hostcnt; off++)
         {
-         /* FIXME: grab baseservicehome! */
+
+          if (GNUNET_YES
+              == GNUNET_CONFIGURATION_get_value_string (pcfg, "PATHS",
+                                                        "SERVICEHOME",
+                                                        &baseservicehome))
+            {
+              if (hostname != NULL)
+                GNUNET_asprintf (&newservicehome, "%s/%s/%d/", 
baseservicehome, hostname, off);
+              else
+                GNUNET_asprintf (&newservicehome, "%s/%d/", baseservicehome, 
off);
+              GNUNET_free (baseservicehome);
+              baseservicehome = NULL;
+            }
+          else
+            {
+              tmpdir = getenv ("TMPDIR");
+              tmpdir = tmpdir ? tmpdir : "/tmp";
+              if (hostname != NULL)
+                GNUNET_asprintf (&newservicehome, "%s/%s/%s/%d/", tmpdir, 
hostname,
+                                 "gnunet-testing-test-test", off);
+              else
+                GNUNET_asprintf (&newservicehome, "%s/%s/%d/", tmpdir,
+                                 "gnunet-testing-test-test", off);
+            }
           GNUNET_asprintf (&newservicehome, 
                           "%s/%s/",
                           baseservicehome, 
@@ -6134,7 +6165,7 @@
                             baseservicehome, 
                             pg->hosts[off].hostname);
          
-         // FIXME: free--- GNUNET_free (baseservicehome);
+         GNUNET_free (baseservicehome);
          
           /* FIXME: Doesn't support ssh_port option! */
           proc = GNUNET_OS_start_process (NULL, NULL,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]