[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21357 - gnunet/src/testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21357 - gnunet/src/testing |
Date: |
Tue, 8 May 2012 21:02:31 +0200 |
Author: bartpolot
Date: 2012-05-08 21:02:31 +0200 (Tue, 08 May 2012)
New Revision: 21357
Modified:
gnunet/src/testing/testing.c
gnunet/src/testing/testing_group.c
Log:
- fixed more memory leaks, doc, refactor
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2012-05-08 18:36:53 UTC (rev 21356)
+++ gnunet/src/testing/testing.c 2012-05-08 19:02:31 UTC (rev 21357)
@@ -694,8 +694,8 @@
GNUNET_free_non_null (d->hostname);
GNUNET_free_non_null (d->username);
GNUNET_free_non_null (d->shortname);
- // GNUNET_free_non_null (d->proc); // !? FIXME
- // d->proc_arm_stop = NULL;
+ GNUNET_OS_process_destroy (d->proc_arm_stop);
+ d->proc_arm_stop = NULL;
GNUNET_free (d);
return;
}
@@ -1475,9 +1475,10 @@
kill_and_close_process (d->proc_arm_peerinfo);
d->proc_arm_peerinfo = NULL;
}
- if ((d->running == GNUNET_NO) && (d->churn == GNUNET_YES)) /* Peer has
already been stopped in churn context! */
+ if ((d->running == GNUNET_NO) && (d->churn == GNUNET_YES))
{
- /* Free what was left from churning! */
+ /* Peer has already been stopped in churn context!
+ * Free what was left from churning! */
GNUNET_assert (d->cfg != NULL);
GNUNET_CONFIGURATION_destroy (d->cfg);
if (delete_files == GNUNET_YES)
Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c 2012-05-08 18:36:53 UTC (rev 21356)
+++ gnunet/src/testing/testing_group.c 2012-05-08 19:02:31 UTC (rev 21357)
@@ -2911,7 +2911,7 @@
GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp", mytemp,
arg, NULL);
GNUNET_assert (procarr[pg_iter] != NULL);
ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule
this, throttle! */
- GNUNET_OS_process_destroy (procarr[pg_iter]);
+ GNUNET_OS_process_close (procarr[pg_iter]);
if (ret != GNUNET_OK)
{
/* FIXME: free contents of 'procarr' array */
@@ -2953,7 +2953,7 @@
}
else
{
- GNUNET_OS_process_destroy (procarr[pg_iter]);
+ GNUNET_OS_process_close (procarr[pg_iter]);
procarr[pg_iter] = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "File %d copied\n", pg_iter);
}
@@ -3128,7 +3128,7 @@
}
else
{
- GNUNET_OS_process_destroy (procarr[pg_iter]);
+ GNUNET_OS_process_close (procarr[pg_iter]);
procarr[pg_iter] = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "File %d copied\n", pg_iter);
}
@@ -5672,7 +5672,7 @@
}
}
- GNUNET_OS_process_destroy (helper->proc);
+ GNUNET_OS_process_close (helper->proc);
}
static void
@@ -5935,7 +5935,7 @@
GNUNET_free (tmpdir);
GNUNET_free (arg);
GNUNET_OS_process_wait (proc);
- GNUNET_OS_process_destroy (proc);
+ GNUNET_OS_process_close (proc);
}
GNUNET_free (baseservicehome);
baseservicehome = NULL;
@@ -6161,7 +6161,7 @@
GNUNET_assert (0);
}
GNUNET_OS_process_wait (proc);
- GNUNET_OS_process_destroy (proc);
+ GNUNET_OS_process_close (proc);
}
/* Now all the configuration files and hostkeys are copied to the remote
host. Call the hostkey callback for each peer! */
GNUNET_SCHEDULER_add_now (&call_hostkey_callbacks, pg);
@@ -6810,22 +6810,24 @@
{
struct PeerShutdownContext *peer_shutdown_ctx = cls;
struct ShutdownContext *shutdown_ctx;
+ struct GNUNET_TESTING_Daemon *d;
GNUNET_assert (peer_shutdown_ctx != NULL);
+ d = peer_shutdown_ctx->daemon;
shutdown_ctx = peer_shutdown_ctx->shutdown_ctx;
GNUNET_assert (shutdown_ctx != NULL);
if ((shutdown_ctx->outstanding < shutdown_ctx->pg->max_concurrent_ssh) ||
- ((peer_shutdown_ctx->daemon->hostname != NULL) &&
+ ((d->hostname != NULL) &&
(count_outstanding_at_host
- (peer_shutdown_ctx->daemon->hostname,
+ (d->hostname,
shutdown_ctx->pg) < shutdown_ctx->pg->max_concurrent_ssh)))
{
- if (peer_shutdown_ctx->daemon->hostname != NULL)
- increment_outstanding_at_host (peer_shutdown_ctx->daemon->hostname,
+ if (d->hostname != NULL)
+ increment_outstanding_at_host (d->hostname,
shutdown_ctx->pg);
shutdown_ctx->outstanding++;
- GNUNET_TESTING_daemon_stop (peer_shutdown_ctx->daemon,
+ GNUNET_TESTING_daemon_stop (d,
shutdown_ctx->timeout,
&internal_shutdown_callback, peer_shutdown_ctx,
shutdown_ctx->delete_files, GNUNET_NO);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21357 - gnunet/src/testing,
gnunet <=