struct Place *plc = cls;
if (GNUNET_PSYC_MESSAGE_REQUEST & ntohs (msg->flags)
- && GNUNET_YES == plc->is_host);
+ && GNUNET_YES == plc->is_host)
{
struct Host *hst = cls;
host_relay_message_part (hst, &meth->header, &msg->slave_pub_key);
struct Place *plc = cls;
if (GNUNET_PSYC_MESSAGE_REQUEST & ntohs (msg->flags)
- && GNUNET_YES == plc->is_host);
+ && GNUNET_YES == plc->is_host)
{
struct Host *hst = cls;
host_relay_message_part (hst, pmsg, &msg->slave_pub_key);
struct Place *plc = cls;
if (GNUNET_PSYC_MESSAGE_REQUEST & ntohs (msg->flags)
- && GNUNET_YES == plc->is_host);
+ && GNUNET_YES == plc->is_host)
{
struct Host *hst = cls;
host_relay_message_part (hst, pmsg, &msg->slave_pub_key);
struct Place *plc = cls;
if (GNUNET_PSYC_MESSAGE_REQUEST & ntohs (msg->flags)
- && GNUNET_YES == plc->is_host);
+ && GNUNET_YES == plc->is_host)
{
struct Host *hst = cls;
host_relay_message_part (hst, pmsg, &msg->slave_pub_key);
uint16_t relay_size = gst->relay_count * sizeof (*relays);
if (remaining < relay_size)
{
+ GNUNET_free (gst);
GNUNET_break (0);
return GNUNET_SYSERR;
}
{
if (NULL != gcls->join_msg)
GNUNET_free (gcls->join_msg);
+ GNUNET_free (gcls);
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
/** @todo FIXME: send only to requesting client */
place_send_msg (plc, &res->header);
+
+ GNUNET_free (res);
}
/** @todo FIXME: send only to requesting client */
place_send_msg (plc, &res->header);
+
+ GNUNET_free (res);
}
if (GNUNET_OK !=
GNUNET_DISK_file_size (filename, &file_size, GNUNET_YES, GNUNET_YES)
|| file_size < sizeof (struct PlaceEnterRequest))
+ {
+ GNUNET_free (filename);
return GNUNET_OK;
+ }
struct PlaceEnterRequest *ereq = GNUNET_malloc (file_size);
ssize_t read_size = GNUNET_DISK_fn_read (filename, ereq, file_size);
+ GNUNET_free (filename);
if (read_size < 0 || read_size < sizeof (*ereq))
{
GNUNET_free (ereq);
if (opt_ego)
{
- GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego,
- strlen (opt_ego),
- &ego_pub_key);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego,
+ strlen (opt_ego),
+ &ego_pub_key));
}
core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"_notice_place_leave: got method from nym %s (%s).\n",
GNUNET_h2s (&hst->notice_place_leave_nym->pub_key_hash), str);
+ GNUNET_free (str);
}
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"_notice_place_leave: got EOM from nym %s (%s).\n",
GNUNET_h2s (&hst->notice_place_leave_nym->pub_key_hash), str);
+ GNUNET_free (str);
if (GNUNET_YES != is_cancelled)
{
void
GNUNET_SOCIAL_host_eject (struct GNUNET_SOCIAL_Host *hst,
const struct GNUNET_SOCIAL_Nym *nym,
- struct GNUNET_PSYC_Environment *env)
+ struct GNUNET_PSYC_Environment *e)
{
+ struct GNUNET_PSYC_Environment *env = e;
if (NULL == env)
env = GNUNET_PSYC_env_create ();
GNUNET_PSYC_env_add (env, GNUNET_PSYC_OP_SET,
"_nym", &nym->pub_key, sizeof (nym->pub_key));
GNUNET_SOCIAL_host_announce (hst, "_notice_place_leave", env, NULL, NULL,
GNUNET_SOCIAL_ANNOUNCE_NONE);
+ if (NULL == e)
+ GNUNET_PSYC_env_destroy (env);
}
uint16_t password_size = strlen (password) + 1;
uint16_t join_msg_size = 0;
- if (NULL != join_msg);
+ if (NULL != join_msg)
join_msg_size = ntohs (join_msg->header.size);
uint16_t greq_size = sizeof (struct GuestEnterByNameRequest)
const struct GNUNET_CRYPTO_EcdsaPublicKey *ego_pub_key,
const char *name)
{
+ char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Got app ego notification: %p %s %s\n",
- ego, name,
- GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key));
+ ego, name, ego_pub_str);
+ GNUNET_free (ego_pub_str);
if (NULL != strstr (name, host_name) && TEST_HOST_CREATE == test)
{
case TEST_HOST_ANSWER_DOOR_ADMIT:
test = TEST_GUEST_RECV_ENTRY_DCSN_ADMIT;
+ // fall through
+
case TEST_GUEST_ENTER_BY_NAME:
join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env,
DATA2ARG ("Welcome, nym!"));