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;
}
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)
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 */
}
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);
}
}
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);
}
}
}
- GNUNET_OS_process_destroy (helper->proc);
+ GNUNET_OS_process_close (helper->proc);
}
static void
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;
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);
{
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);