diff options
Diffstat (limited to 'src/psyc/gnunet-service-psyc.c')
-rw-r--r-- | src/psyc/gnunet-service-psyc.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 75a94bcb7..38ec10e4d 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c | |||
@@ -1030,9 +1030,12 @@ client_send_mcast_req (struct Master *mst, | |||
1030 | pmsg->fragment_offset = req->fragment_offset; | 1030 | pmsg->fragment_offset = req->fragment_offset; |
1031 | pmsg->flags = htonl (GNUNET_PSYC_MESSAGE_REQUEST); | 1031 | pmsg->flags = htonl (GNUNET_PSYC_MESSAGE_REQUEST); |
1032 | pmsg->slave_pub_key = req->member_pub_key; | 1032 | pmsg->slave_pub_key = req->member_pub_key; |
1033 | |||
1034 | memcpy (&pmsg[1], &req[1], size - sizeof (*req)); | 1033 | memcpy (&pmsg[1], &req[1], size - sizeof (*req)); |
1034 | |||
1035 | client_send_msg (chn, &pmsg->header); | 1035 | client_send_msg (chn, &pmsg->header); |
1036 | |||
1037 | /* FIXME: save req to PSYCstore so that it can be resent later to clients */ | ||
1038 | |||
1036 | GNUNET_free (pmsg); | 1039 | GNUNET_free (pmsg); |
1037 | } | 1040 | } |
1038 | 1041 | ||
@@ -2057,12 +2060,14 @@ slave_transmit_notify (void *cls, size_t *data_size, void *data) | |||
2057 | static void | 2060 | static void |
2058 | master_transmit_message (struct Master *mst) | 2061 | master_transmit_message (struct Master *mst) |
2059 | { | 2062 | { |
2060 | if (NULL == mst->chn.tmit_head) | 2063 | struct Channel *chn = &mst->chn; |
2064 | struct TransmitMessage *tmit_msg = chn->tmit_head; | ||
2065 | if (NULL == tmit_msg) | ||
2061 | return; | 2066 | return; |
2062 | if (NULL == mst->tmit_handle) | 2067 | if (NULL == mst->tmit_handle) |
2063 | { | 2068 | { |
2064 | mst->tmit_handle | 2069 | mst->tmit_handle |
2065 | = GNUNET_MULTICAST_origin_to_all (mst->origin, mst->chn.tmit_head->id, | 2070 | = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id, |
2066 | mst->max_group_generation, | 2071 | mst->max_group_generation, |
2067 | master_transmit_notify, mst); | 2072 | master_transmit_notify, mst); |
2068 | } | 2073 | } |
@@ -2167,12 +2172,18 @@ slave_queue_message (struct Slave *slv, struct TransmitMessage *tmit_msg) | |||
2167 | /** | 2172 | /** |
2168 | * Queue PSYC message parts for sending to multicast. | 2173 | * Queue PSYC message parts for sending to multicast. |
2169 | * | 2174 | * |
2170 | * @param chn Channel to send to. | 2175 | * @param chn |
2171 | * @param client Client the message originates from. | 2176 | * Channel to send to. |
2172 | * @param data_size Size of @a data. | 2177 | * @param client |
2173 | * @param data Concatenated message parts. | 2178 | * Client the message originates from. |
2174 | * @param first_ptype First message part type in @a data. | 2179 | * @param data_size |
2175 | * @param last_ptype Last message part type in @a data. | 2180 | * Size of @a data. |
2181 | * @param data | ||
2182 | * Concatenated message parts. | ||
2183 | * @param first_ptype | ||
2184 | * First message part type in @a data. | ||
2185 | * @param last_ptype | ||
2186 | * Last message part type in @a data. | ||
2176 | */ | 2187 | */ |
2177 | static struct TransmitMessage * | 2188 | static struct TransmitMessage * |
2178 | queue_message (struct Channel *chn, | 2189 | queue_message (struct Channel *chn, |