"Successfully started peer `%4s'.\n", GNUNET_i2s (my_identity));
#endif
d->id = *my_identity;
- d->shortname = strdup (GNUNET_i2s (my_identity));
+ if (d->shortname == NULL)
+ d->shortname = strdup (GNUNET_i2s (my_identity));
d->server = server;
d->running = GNUNET_YES;
NULL, d->cfg, d, _("`scp' did not complete cleanly.\n"));
return;
}
+ GNUNET_OS_process_close(d->proc);
#if DEBUG_TESTING
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Successfully copied configuration file.\n");
GNUNET_TRANSPORT_disconnect (d->th);
d->th = NULL;
}
+
+ if (NULL != d->dead_cb)
+ d->dead_cb (d->dead_cb_cls, NULL);
+
/* state clean up and notifications */
if (d->churn == GNUNET_NO)
{
GNUNET_free_non_null (d->proc);
d->proc = NULL;
d->shortname = NULL;
- if (NULL != d->dead_cb)
- d->dead_cb (d->dead_cb_cls, NULL);
-
if (d->churn == GNUNET_NO)
GNUNET_free (d);
GNUNET_CRYPTO_hash(&public_key, sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &ret->id.hashPubKey);
ret->shortname = GNUNET_strdup(GNUNET_i2s(&ret->id));
ret->have_hostkey = GNUNET_YES;
- GNUNET_free(private_key);
+ GNUNET_CRYPTO_rsa_key_free(private_key);
}
/* Write hostkey to file, if we were given one */
= GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_EXEC_WAIT,
&start_fsm, ret);
GNUNET_free_non_null(hostkeyfile);
+ GNUNET_free(baseservicehome);
GNUNET_free(servicehome);
return ret;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating remote dir with command ssh %s %s %s\n", arg,
" mkdir -p ", baseservicehome);
+ GNUNET_free(arg);
GNUNET_OS_process_wait (proc);
+ GNUNET_OS_process_close(proc);
}
GNUNET_free(baseservicehome);
internal_shutdown_callback(void *cls, const char *emsg)
{
struct PeerShutdownContext *peer_shutdown_ctx = cls;
- struct ShutdownContext *shutdown_ctx = cls;
+ struct ShutdownContext *shutdown_ctx = peer_shutdown_ctx->shutdown_ctx;
unsigned int off;
+ struct OutstandingSSH *ssh_pos;
shutdown_ctx->outstanding--;
if (peer_shutdown_ctx->daemon->hostname != NULL)
GNUNET_free_non_null (shutdown_ctx->pg->hosts[off].username);
}
GNUNET_free_non_null (shutdown_ctx->pg->hosts);
+ while (NULL != (ssh_pos = shutdown_ctx->pg->ssh_head))
+ {
+ GNUNET_CONTAINER_DLL_remove(shutdown_ctx->pg->ssh_head, shutdown_ctx->pg->ssh_tail, ssh_pos);
+ GNUNET_free(ssh_pos);
+ }
GNUNET_free (shutdown_ctx->pg);
-
GNUNET_free (shutdown_ctx);
}
GNUNET_free(peer_shutdown_ctx);