gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r14416 - gnunet/src/testing
Date: Tue, 15 Feb 2011 18:51:30 +0100

Author: nevans
Date: 2011-02-15 18:51:30 +0100 (Tue, 15 Feb 2011)
New Revision: 14416

Modified:
   gnunet/src/testing/testing_group.c
Log:
fix for friend file copying using ssh, should still be set up to throttle 
connections

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2011-02-15 16:52:27 UTC (rev 14415)
+++ gnunet/src/testing/testing_group.c  2011-02-15 17:51:30 UTC (rev 14416)
@@ -44,7 +44,7 @@
  * enough to not conflict with client-ports (typically starting around
  * 32k).
  */
-#define LOW_PORT 10000
+#define LOW_PORT 12000
 
 /**
  * Highest port used for GNUnet testing.  Should be low enough to not
@@ -2539,11 +2539,15 @@
   struct GNUNET_OS_Process **procarr;
   char *arg;
   char *mytemp;
+#if NOT_STUPID
   enum GNUNET_OS_ProcessStatusType type;
   unsigned long return_code;
   int count;
+  int max_wait = 10;
+#endif
   int ret;
-  int max_wait = 10;
+
+  ret = GNUNET_OK;
 #if OLD
   struct GNUNET_CRYPTO_HashAsciiEncoded peer_enc;
   struct PeerConnection *conn_iter;
@@ -2615,6 +2619,11 @@
             GNUNET_OS_start_process (NULL, NULL, "scp", "scp", mytemp, arg,
                                      NULL);
 
+          ret = GNUNET_OS_process_wait(procarr[pg_iter]); /* FIXME: schedule 
this, throttle! */
+          GNUNET_OS_process_close (procarr[pg_iter]);
+          if (ret != GNUNET_OK)
+            return ret;
+          procarr[pg_iter] = NULL;
 #if VERBOSE_TESTING
           GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                       _("Copying file with command scp %s %s\n"), mytemp,
@@ -2626,6 +2635,7 @@
       GNUNET_free (mytemp);
     }
 
+#if NOT_STUPID
   count = 0;
   ret = GNUNET_SYSERR;
   while ((count < max_wait) && (ret != GNUNET_OK))
@@ -2672,6 +2682,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               _("Finished copying all friend files!\n"));
 #endif
+#endif
   GNUNET_free (procarr);
   return ret;
 }




reply via email to

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