/*
This file is part of GNUnet.
- (C) 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* 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.)
*
/**
* Current task for executing the plan.
*/
- GNUNET_SCHEDULER_TaskIdentifier task;
+ struct GNUNET_SCHEDULER_Task * task;
};
/**
* 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
GNUNET_CONTAINER_multihashmap_contains_value (pp->plan_map,
get_rp_key (rp),
rp));
- if (GNUNET_SCHEDULER_NO_TASK != pp->task)
+ if (NULL != pp->task)
GNUNET_SCHEDULER_cancel (pp->task);
pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
#undef N
* 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)
*/
if (NULL == buf)
{
/* failed, try again... */
- if (GNUNET_SCHEDULER_NO_TASK != pp->task)
+ if (NULL != pp->task)
GNUNET_SCHEDULER_cancel (pp->task);
pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
if (NULL == rp)
{
- if (GNUNET_SCHEDULER_NO_TASK != pp->task)
+ if (NULL != pp->task)
GNUNET_SCHEDULER_cancel (pp->task);
pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
return 0;
msize = GSF_pending_request_get_message_ (get_latest (rp), buf_size, buf);
if (msize > buf_size)
{
- if (GNUNET_SCHEDULER_NO_TASK != pp->task)
+ if (NULL != pp->task)
GNUNET_SCHEDULER_cancel (pp->task);
/* buffer to small (message changed), try again */
pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
size_t msize;
struct GNUNET_TIME_Relative delay;
- pp->task = GNUNET_SCHEDULER_NO_TASK;
+ pp->task = NULL;
if (NULL != pp->pth)
{
GSF_peer_transmit_cancel_ (pp->pth);
* @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)
GSF_peer_transmit_cancel_ (pp->pth);
pp->pth = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != pp->task)
+ if (NULL != pp->task)
{
GNUNET_SCHEDULER_cancel (pp->task);
- pp->task = GNUNET_SCHEDULER_NO_TASK;
+ pp->task = NULL;
}
while (NULL != (rp = GNUNET_CONTAINER_heap_remove_root (pp->priority_heap)))
{
/**
* 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;