* a particular pending request.
*
* The corresponding head and tail of the "PE" MDLL
- * are stored in a 'struct GSF_RequestPlan'. (We need
+ * are stored in a `struct GSF_RequestPlan`. (We need
* to be able to lookup all pending requests corresponding
* to a given plan entry.)
- *
+ *
* Similarly head and tail of the "PR" MDLL are stored
* with the 'struct GSF_PendingRequest'. (We need
* to be able to lookup all plan entries corresponding
/**
* Figure out when and how to transmit to the given peer.
*
- * @param cls the 'struct GSF_ConnectedPeer' for transmission
+ * @param cls the `struct GSF_ConnectedPeer` for transmission
* @param tc scheduler context
*/
static void
if (NULL == bi)
return NULL; /* should never happen */
ret = bi->pr;
- bi = bi->next_PE;
+ bi = bi->next_PE;
while (NULL != bi)
{
if (GSF_pending_request_get_data_ (bi->pr)->ttl.abs_value_us >
* Function called to get a message for transmission.
*
* @param cls closure
- * @param buf_size number of bytes available in buf
+ * @param buf_size number of bytes available in @a buf
* @param buf where to copy the message, NULL on error (peer disconnect)
* @return number of bytes copied to 'buf', can be 0 (without indicating an error)
*/
/**
* Figure out when and how to transmit to the given peer.
*
- * @param cls the 'struct PeerPlan'
+ * @param cls the `struct PeerPlan`
* @param tc scheduler context
*/
static void
/**
- * Closure for 'merge_pr'.
+ * Closure for merge_pr().
*/
struct MergeContext
{
* @param cls closure
* @param query the query
* @param element request plan stored at the node
- * @return GNUNET_YES if we should continue to iterate,
- * GNUNET_NO if not (merge success)
+ * @return #GNUNET_YES if we should continue to iterate,
+ * #GNUNET_NO if not (merge success)
*/
static int
merge_pr (void *cls, const struct GNUNET_HashCode * query, void *element)
* @param pr request with the entry
*/
void
-GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr)
+GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
+ struct GSF_PendingRequest *pr)
{
const struct GNUNET_PeerIdentity *id;
struct PeerPlan *pp;
pp->delay_heap =
GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
pp->cp = cp;
- GNUNET_CONTAINER_multipeermap_put (plans,
- id, pp,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONTAINER_multipeermap_put (plans,
+ id, pp,
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
mpc.merged = GNUNET_NO;
mpc.pr = pr;
GNUNET_CONTAINER_multihashmap_get_multiple (pp->plan_map,
&GSF_pending_request_get_data_
- (pr)->query, &merge_pr, &mpc); // 8 MB in 'merge_pr'
+ (pr)->query, &merge_pr, &mpc);
if (GNUNET_NO != mpc.merged)
return;
GNUNET_CONTAINER_multihashmap_get_multiple (pp->plan_map,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Planning transmission of query `%s' to peer `%s'\n",
GNUNET_h2s (&prd->query), GNUNET_i2s (id));
- rp = GNUNET_new (struct GSF_RequestPlan); // 8 MB
+ rp = GNUNET_new (struct GSF_RequestPlan);
bi = GNUNET_new (struct GSF_PendingRequestPlanBijection);
bi->rp = rp;
bi->pr = pr;
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_put (pp->plan_map,
get_rp_key (rp), rp,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); // 8 MB
- plan (pp, rp); // +5 MB (plan/heap-insert)
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
+ plan (pp, rp);
}
/**
* Get the last transmission attempt time for the request plan list
- * referenced by 'pr_head', that was sent to 'sender'
+ * referenced by @a pr_head, that was sent to @a sender
*
* @param pr_head request plan reference list to check.
* @param sender the peer that we've sent the request to.
- * @param result the timestamp to fill, set to "FOREVER" if never transmitted
- * @return GNUNET_YES if 'result' was changed, GNUNET_NO otherwise.
+ * @param result the timestamp to fill, set to #GNUNET_TIME_UNIT_FOREVER_ABS if never transmitted
+ * @return #GNUNET_YES if @a result was changed, #GNUNET_NO otherwise.
*/
int
-GSF_request_plan_reference_get_last_transmission_ (
- struct GSF_PendingRequestPlanBijection *pr_head, struct GSF_ConnectedPeer *sender,
- struct GNUNET_TIME_Absolute *result)
+GSF_request_plan_reference_get_last_transmission_ (struct GSF_PendingRequestPlanBijection *pr_head,
+ struct GSF_ConnectedPeer *sender,
+ struct GNUNET_TIME_Absolute *result)
{
struct GSF_PendingRequestPlanBijection *bi;