gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r20208 - gnunet/src/testing
Date: Fri, 2 Mar 2012 20:05:53 +0100

Author: bartpolot
Date: 2012-03-02 20:05:53 +0100 (Fri, 02 Mar 2012)
New Revision: 20208

Modified:
   gnunet/src/testing/testing_group.c
Log:
- LRN: Use RENAME() instead of 'mv'

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2012-03-02 17:30:03 UTC (rev 20207)
+++ gnunet/src/testing/testing_group.c  2012-03-02 19:05:53 UTC (rev 20208)
@@ -2927,15 +2927,12 @@
     if (pg->peers[pg_iter].daemon->hostname == NULL)    /* Local, just copy 
the file */
     {
       GNUNET_asprintf (&arg, "%s/friends", temp_service_path);
-      procarr[pg_iter] =
-       GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "mv", "mv", mytemp, 
arg, NULL);
-      GNUNET_assert (procarr[pg_iter] != NULL);
 #if VERBOSE_TESTING
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Copying file with command cp %s %s\n", mytemp, arg);
+                  "Copying file with RENAME(%s,%s)\n", mytemp, arg);
 #endif
-      ret = GNUNET_OS_process_wait (procarr[pg_iter]);  /* FIXME: schedule 
this, throttle! */
-      GNUNET_OS_process_close (procarr[pg_iter]);
+      RENAME (mytemp, arg);
+      procarr[pg_iter] = NULL;
       GNUNET_free (arg);
     }
     else                        /* Remote, scp the file to the correct place */
@@ -3126,11 +3123,11 @@
     if (pg->peers[pg_iter].daemon->hostname == NULL)    /* Local, just copy 
the file */
     {
       GNUNET_asprintf (&arg, "%s/blacklist", temp_service_path);
-      procarr[pg_iter] =
-       GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "mv", "mv", mytemp, 
arg, NULL);
+      RENAME (mytemp, arg);
+      procarr[pg_iter] = NULL;
 #if VERBOSE_TESTING
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  _("Copying file with command cp %s %s\n"), mytemp, arg);
+                  _("Copying file with RENAME (%s,%s)\n"), mytemp, arg);
 #endif
 
       GNUNET_free (arg);




reply via email to

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