diff options
Diffstat (limited to 'src/psycstore/psycstore_api.c')
-rw-r--r-- | src/psycstore/psycstore_api.c | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/src/psycstore/psycstore_api.c b/src/psycstore/psycstore_api.c index f034ff4758..9df55888d0 100644 --- a/src/psycstore/psycstore_api.c +++ b/src/psycstore/psycstore_api.c @@ -638,18 +638,27 @@ GNUNET_PSYCSTORE_operation_cancel (struct GNUNET_PSYCSTORE_OperationHandle *op) * Store join/leave events for a PSYC channel in order to be able to answer * membership test queries later. * - * @param h Handle for the PSYCstore. - * @param channel_key The channel where the event happened. - * @param slave_key Public key of joining/leaving slave. - * @param did_join #GNUNET_YES on join, #GNUNET_NO on part. - * @param announced_at ID of the message that announced the membership change. - * @param effective_since Message ID this membership change is in effect since. + * @param h + * Handle for the PSYCstore. + * @param channel_key + * The channel where the event happened. + * @param slave_key + * Public key of joining/leaving slave. + * @param did_join + * #GNUNET_YES on join, #GNUNET_NO on part. + * @param announced_at + * ID of the message that announced the membership change. + * @param effective_since + * Message ID this membership change is in effect since. * For joins it is <= announced_at, for parts it is always 0. - * @param group_generation In case of a part, the last group generation the - * slave has access to. It has relevance when a larger message have - * fragments with different group generations. - * @param rcb Callback to call with the result of the storage operation. - * @param rcb_cls Closure for the callback. + * @param group_generation + * In case of a part, the last group generation the slave has access to. + * It has relevance when a larger message have fragments with different + * group generations. + * @param rcb + * Callback to call with the result of the storage operation. + * @param rcb_cls + * Closure for the callback. * * @return Operation handle that can be used to cancel the operation. */ @@ -667,6 +676,7 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, GNUNET_assert (NULL != h); GNUNET_assert (NULL != channel_key); GNUNET_assert (NULL != slave_key); + GNUNET_assert (GNUNET_YES == did_join || GNUNET_NO == did_join); GNUNET_assert (did_join ? effective_since <= announced_at : effective_since == 0); @@ -684,7 +694,7 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, req->header.size = htons (sizeof (*req)); req->channel_key = *channel_key; req->slave_key = *slave_key; - req->did_join = htonl (did_join); + req->did_join = did_join; req->announced_at = GNUNET_htonll (announced_at); req->effective_since = GNUNET_htonll (effective_since); req->group_generation = GNUNET_htonll (group_generation); @@ -707,15 +717,22 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, * is also used when handling join requests to determine whether the slave is * currently admitted to the channel. * - * @param h Handle for the PSYCstore. - * @param channel_key The channel we are interested in. - * @param slave_key Public key of slave whose membership to check. - * @param message_id Message ID for which to do the membership test. - * @param group_generation Group generation of the fragment of the message to - * test. It has relevance if the message consists of multiple fragments - * with different group generations. - * @param rcb Callback to call with the test result. - * @param rcb_cls Closure for the callback. + * @param h + * Handle for the PSYCstore. + * @param channel_key + * The channel we are interested in. + * @param slave_key + * Public key of slave whose membership to check. + * @param message_id + * Message ID for which to do the membership test. + * @param group_generation + * Group generation of the fragment of the message to test. + * It has relevance if the message consists of multiple fragments with + * different group generations. + * @param rcb + * Callback to call with the test result. + * @param rcb_cls + * Closure for the callback. * * @return Operation handle that can be used to cancel the operation. */ |