static void
-schedule_transmit_message (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+schedule_transmit_message (void *cls)
{
struct Channel *chn = cls;
+
transmit_message (chn);
}
* Task run during shutdown.
*
* @param cls unused
- * @param tc unused
*/
static void
-shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
if (NULL != nc)
{
pmsg->fragment_offset = req->fragment_offset;
pmsg->flags = htonl (GNUNET_PSYC_MESSAGE_REQUEST);
pmsg->slave_pub_key = req->member_pub_key;
-
memcpy (&pmsg[1], &req[1], size - sizeof (*req));
+
client_send_msg (chn, &pmsg->header);
+
+ /* FIXME: save req to PSYCstore so that it can be resent later to clients */
+
GNUNET_free (pmsg);
}
static void
master_transmit_message (struct Master *mst)
{
- if (NULL == mst->chn.tmit_head)
+ struct Channel *chn = &mst->chn;
+ struct TransmitMessage *tmit_msg = chn->tmit_head;
+ if (NULL == tmit_msg)
return;
if (NULL == mst->tmit_handle)
{
mst->tmit_handle
- = GNUNET_MULTICAST_origin_to_all (mst->origin, mst->chn.tmit_head->id,
+ = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id,
mst->max_group_generation,
master_transmit_notify, mst);
}
/**
* Queue PSYC message parts for sending to multicast.
*
- * @param chn Channel to send to.
- * @param client Client the message originates from.
- * @param data_size Size of @a data.
- * @param data Concatenated message parts.
- * @param first_ptype First message part type in @a data.
- * @param last_ptype Last message part type in @a data.
+ * @param chn
+ * Channel to send to.
+ * @param client
+ * Client the message originates from.
+ * @param data_size
+ * Size of @a data.
+ * @param data
+ * Concatenated message parts.
+ * @param first_ptype
+ * First message part type in @a data.
+ * @param last_ptype
+ * Last message part type in @a data.
*/
static struct TransmitMessage *
queue_message (struct Channel *chn,