{
struct GNUNET_SOCIAL_Host *hst = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "handle_host_enter_request\n");
+
if (NULL == hst->answer_door_cb)
return;
{
struct GNUNET_HashCode place_pub_hash;
GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"%s place cleanup: %s\n",
GNUNET_YES == plc->is_host ? "host" : "guest",
GNUNET_h2s (&place_pub_hash));
}
if (NULL != plc->mq)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "destroying MQ (place_cleanup)\n");
GNUNET_MQ_destroy (plc->mq);
plc->mq = NULL;
}
void
-place_disconnect (struct GNUNET_SOCIAL_Place *plc,
- GNUNET_ContinuationCallback cb,
- void *cls)
+place_disconnect (struct GNUNET_SOCIAL_Place *plc)
{
- plc->disconnect_cb = cb;
- plc->disconnect_cls = cls;
-
+ struct GNUNET_HashCode place_pub_hash;
+ GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "place_disconnect, plc = %s\n",
+ GNUNET_h2s (&place_pub_hash));
if (NULL != plc->mq)
{
struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq);
void
place_leave (struct GNUNET_SOCIAL_Place *plc)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "social_api: place_leave\n");
struct GNUNET_MessageHeader *msg;
struct GNUNET_MQ_Envelope *
env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE);
}
if (NULL != plc->mq)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "destroying MQ (host_disconnected)\n");
GNUNET_MQ_destroy (plc->mq);
plc->mq = NULL;
}
GNUNET_ContinuationCallback disconnect_cb,
void *cls)
{
- place_disconnect (&hst->plc, disconnect_cb, cls);
+ struct GNUNET_SOCIAL_Place *plc = &hst->plc;
+
+ plc->disconnect_cb = disconnect_cb;
+ plc->disconnect_cls = cls;
+ place_disconnect (plc);
}
GNUNET_ContinuationCallback disconnect_cb,
void *cls)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "GNUNET_SOCIAL_host_leave\n");
GNUNET_SOCIAL_host_announce (hst, "_notice_place_closing", env, NULL, NULL,
GNUNET_SOCIAL_ANNOUNCE_NONE);
place_leave (&hst->plc);
}
if (NULL != plc->mq)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "destroying MQ (guest_disconnected)\n");
GNUNET_MQ_destroy (plc->mq);
plc->mq = NULL;
}
GNUNET_ContinuationCallback disconnect_cb,
void *cls)
{
- place_disconnect (&gst->plc, disconnect_cb, cls);
+ struct GNUNET_SOCIAL_Place *plc = &gst->plc;
+
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "GNUNET_SOCIAL_guest_disconnect, gst = %p\n",
+ gst);
+ plc->disconnect_cb = disconnect_cb;
+ plc->disconnect_cls = cls;
+ place_disconnect (plc);
}
GNUNET_assert (NULL != method_prefix);
struct MsgProcRequest *mpreq;
uint16_t method_size = strnlen (method_prefix,
- GNUNET_SERVER_MAX_MESSAGE_SIZE
+ GNUNET_MAX_MESSAGE_SIZE
- sizeof (*mpreq)) + 1;
GNUNET_assert ('\0' == method_prefix[method_size - 1]);
GNUNET_assert (NULL != method_prefix);
uint16_t method_size = strnlen (method_prefix,
- GNUNET_SERVER_MAX_MESSAGE_SIZE
+ GNUNET_MAX_MESSAGE_SIZE
- sizeof (*req)) + 1;
GNUNET_assert ('\0' == method_prefix[method_size - 1]);
look->op_id = GNUNET_OP_add (plc->op, &op_recv_state_result, look, NULL);
GNUNET_assert (NULL != name);
- size_t name_size = strnlen (name, GNUNET_SERVER_MAX_MESSAGE_SIZE
+ size_t name_size = strnlen (name, GNUNET_MAX_MESSAGE_SIZE
- sizeof (*req)) + 1;
struct GNUNET_MQ_Envelope *
env = GNUNET_MQ_msg_extra (req, name_size, type);
size_t relay_size = relay_count * sizeof (*relays);
size_t payload_size = name_size + password_size + relay_size;
- if (GNUNET_SERVER_MAX_MESSAGE_SIZE < sizeof (*preq) + payload_size)
+ if (GNUNET_MAX_MESSAGE_SIZE < sizeof (*preq) + payload_size)
return GNUNET_SYSERR;
struct GNUNET_MQ_Envelope *
struct ZoneAddNymRequest *nreq;
size_t name_size = strlen (name) + 1;
- if (GNUNET_SERVER_MAX_MESSAGE_SIZE < sizeof (*nreq) + name_size)
+ if (GNUNET_MAX_MESSAGE_SIZE < sizeof (*nreq) + name_size)
return GNUNET_SYSERR;
struct GNUNET_MQ_Envelope *