gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r8708 - GNUnet/src/applications/testing


From: gnunet
Subject: [GNUnet-SVN] r8708 - GNUnet/src/applications/testing
Date: Thu, 16 Jul 2009 11:40:04 -0600

Author: nevans
Date: 2009-07-16 11:40:02 -0600 (Thu, 16 Jul 2009)
New Revision: 8708

Modified:
   GNUnet/src/applications/testing/remote.c
Log:


Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c    2009-07-16 00:11:09 UTC (rev 
8707)
+++ GNUnet/src/applications/testing/remote.c    2009-07-16 17:40:02 UTC (rev 
8708)
@@ -254,6 +254,7 @@
   char *temp_path;
   char *temp_pid_file;
   char *curr_host;
+  char *temp_host_string;
   char *temp_remote_config_path;
   char *dotOutFileName;
 
@@ -274,6 +275,7 @@
   unsigned int j;
   unsigned int pos;
   int temp_remote_config_path_length;
+  int temp_host_string_length;
   int friend_location_length;
   int ret;
   char *ipk_dir;
@@ -467,6 +469,18 @@
                                                     "GNUNETD_HOME",
                                                     temp_remote_config_path);
 
+          temp_host_string_length =
+            snprintf (NULL, 0, "%s:%llu", curr_host, starting_port + 
((unsigned long long)j * port_increment));
+          temp_host_string =
+            GNUNET_malloc (temp_host_string_length + 1);
+          snprintf (temp_host_string,
+                    temp_host_string_length + 1, "%s:%llu", curr_host, 
starting_port + ((unsigned long long)j * port_increment));
+
+          GNUNET_GC_set_configuration_value_string (basecfg, NULL,
+                                                    "NETWORK",
+                                                    "HOST",
+                                                    temp_host_string);
+
           GNUNET_GC_set_configuration_value_number (basecfg, NULL, "NETWORK",
                                                     "PORT",
                                                     starting_port +
@@ -492,6 +506,7 @@
                                            temp_path);
               GNUNET_free (temp_path);
               GNUNET_free (temp_remote_config_path);
+              GNUNET_free(temp_host_string);
               break;
             }
           CLOSE (ret);
@@ -499,6 +514,7 @@
             {
               GNUNET_free (temp_path);
               GNUNET_free (temp_remote_config_path);
+              GNUNET_free(temp_host_string);
               break;
             }
 
@@ -557,6 +573,7 @@
           GNUNET_free (temp_pid_file);
           GNUNET_free (temp_remote_config_path);
           GNUNET_free (temp);
+          GNUNET_free(temp_host_string);
           //UNLINK (temp_path);
           GNUNET_free (temp_path);
 
@@ -639,6 +656,19 @@
                                                         ((j +
                                                           1) *
                                                          port_increment));
+
+              temp_host_string_length =
+              snprintf (NULL, 0, "%s:%llu", curr_host, starting_port + 
((unsigned long long)(j+1) * port_increment));
+              temp_host_string =
+                GNUNET_malloc (temp_host_string_length + 1);
+              snprintf (temp_host_string, temp_host_string_length + 1,
+                        "%s:%llu", curr_host, starting_port + ((unsigned long 
long)(j+1) * port_increment));
+
+              GNUNET_GC_set_configuration_value_string (basecfg, NULL,
+                                                        "NETWORK",
+                                                        "HOST",
+                                                        temp_host_string);
+
               GNUNET_GC_set_configuration_value_number (basecfg, NULL, "TCP",
                                                         "PORT",
                                                         starting_port +
@@ -664,6 +694,7 @@
                                                temp_path);
                   GNUNET_free (temp_path);
                   GNUNET_free (temp_remote_config_path);
+                  GNUNET_free(temp_host_string);
                   break;
                 }
               CLOSE (ret);
@@ -671,6 +702,7 @@
                 {
                   GNUNET_free (temp_path);
                   GNUNET_free (temp_remote_config_path);
+                  GNUNET_free(temp_host_string);
                   break;
                 }
 
@@ -731,6 +763,7 @@
 
               GNUNET_free (temp_pid_file);
               GNUNET_free (temp_remote_config_path);
+              GNUNET_free(temp_host_string);
               //UNLINK (temp_path);
               GNUNET_free (temp_path);
               GNUNET_free (temp);





reply via email to

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