/*
This file is part of GNUnet.
- Copyright (C) 2012, 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012, 2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
/**
* Public key of the member requesting join.
*/
- struct GNUNET_CRYPTO_EcdsaPublicKey member_key;
+ struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
/**
* Peer identity of the member requesting join.
group_send_connect_msg (struct GNUNET_MULTICAST_Group *grp)
{
uint16_t cmsg_size = ntohs (grp->connect_msg->size);
- struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size);
+ struct GNUNET_MessageHeader *cmsg = GNUNET_malloc (cmsg_size);
memcpy (cmsg, grp->connect_msg, cmsg_size);
GNUNET_CLIENT_MANAGER_transmit_now (grp->client, cmsg);
+ GNUNET_free (cmsg);
}
jmsg = NULL;
jh = GNUNET_malloc (sizeof (*jh));
jh->group = grp;
- jh->member_key = jreq->member_key;
+ jh->member_pub_key = jreq->member_pub_key;
jh->peer = jreq->peer;
- grp->join_req_cb (grp->cb_cls, &jreq->member_key, jmsg, jh);
+ grp->join_req_cb (grp->cb_cls, &jreq->member_pub_key, jmsg, jh);
}
struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh));
rh->grp = grp;
rh->req = *rep;
- grp->replay_frag_cb (grp->cb_cls, &rep->member_key,
+ grp->replay_frag_cb (grp->cb_cls, &rep->member_pub_key,
GNUNET_ntohll (rep->fragment_id),
GNUNET_ntohll (rep->flags), rh);
}
struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh));
rh->grp = grp;
rh->req = *rep;
- grp->replay_msg_cb (grp->cb_cls, &rep->member_key,
+ grp->replay_msg_cb (grp->cb_cls, &rep->member_pub_key,
GNUNET_ntohll (rep->message_id),
GNUNET_ntohll (rep->fragment_offset),
GNUNET_ntohll (rep->flags), rh);
hdcsn->header.size = htons (sizeof (*hdcsn) + sizeof (*dcsn)
+ relay_size + join_resp_size);
hdcsn->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION);
- hdcsn->member_key = join->member_key;
+ hdcsn->member_pub_key = join->member_pub_key;
hdcsn->peer = join->peer;
dcsn = (struct MulticastJoinDecisionMessage *) &hdcsn[1];
struct GNUNET_MULTICAST_OriginTransmitHandle *tmit = &orig->tmit;
tmit->origin = orig;
tmit->message_id = message_id;
+ tmit->fragment_offset = 0;
tmit->group_generation = group_generation;
tmit->notify = notify;
tmit->notify_cls = notify_cls;
*/
struct GNUNET_MULTICAST_Member *
GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *group_pub_key,
const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_key,
const struct GNUNET_PeerIdentity *origin,
uint16_t relay_count,
join = GNUNET_malloc (sizeof (*join) + relay_size + join_msg_size);
join->header.size = htons (sizeof (*join) + relay_size + join_msg_size);
join->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_MEMBER_JOIN);
- join->group_key = *group_key;
+ join->group_pub_key = *group_pub_key;
join->member_key = *member_key;
join->origin = *origin;
join->relay_count = ntohl (relay_count);
uint64_t flags)
{
member_replay_request (mem, fragment_id, 0, 0, flags);
+ // FIXME: return
}
uint64_t flags)
{
member_replay_request (mem, 0, message_id, fragment_offset, flags);
+ // FIXME: return
}
struct GNUNET_MULTICAST_MemberTransmitHandle *tmit = &mem->tmit;
tmit->member = mem;
tmit->request_id = request_id;
+ tmit->fragment_offset = 0;
tmit->notify = notify;
tmit->notify_cls = notify_cls;