while (NULL != (th = peer->head))
{
GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, th);
- th->cb (th->cb_cls, GNUNET_SYSERR);
+ th->cb (th->cb_cls);
GNUNET_free (th);
}
GNUNET_free (peer);
GNUNET_CONTAINER_DLL_remove (sh->th_head,
sh->th_tail,
th);
- th->cb (th->cb_cls, GNUNET_SYSERR);
+ th->cb (th->cb_cls);
GNUNET_free (th);
}
}
GNUNET_CONTAINER_DLL_remove (peer->head,
peer->tail,
th);
- th->cb (th->cb_cls,
- (ntohs (ack->header.type) == GNUNET_MESSAGE_TYPE_DV_SEND_ACK)
- ? GNUNET_OK
- : GNUNET_SYSERR);
+ th->cb (th->cb_cls);
GNUNET_free (th);
break;
}
* ID of the task we use to (periodically) update our consensus
* with this peer. Used if we are the initiating peer.
*/
- struct GNUNET_SCHEDULER_Task * initiate_task;
+ struct GNUNET_SCHEDULER_Task *initiate_task;
/**
* At what offset are we, with respect to inserting our own routes
* @param message the actual message
*/
static void
-handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client,
+handle_dv_send_message (void *cls,
+ struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
struct Route *route;
* Clean up the pending request, and call continuations.
*
* @param cls closure
- * @param ok #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
static void
-send_finished (void *cls,
- int ok)
+send_finished (void *cls)
{
struct PendingRequest *pr = cls;
struct GNUNET_ATS_Session *session = pr->session;
if (NULL != pr->transmit_cont)
pr->transmit_cont (pr->transmit_cont_cls,
&session->sender,
- ok,
+ GNUNET_OK,
pr->size, 0);
GNUNET_free (pr);
}
* @param distance distance to the peer
* @param network the peer is located in
*/
-typedef void (*GNUNET_DV_ConnectCallback)(void *cls,
- const struct GNUNET_PeerIdentity *peer,
- uint32_t distance,
- enum GNUNET_ATS_Network_Type network);
+typedef void
+(*GNUNET_DV_ConnectCallback)(void *cls,
+ const struct GNUNET_PeerIdentity *peer,
+ uint32_t distance,
+ enum GNUNET_ATS_Network_Type network);
/**
* @param distance new distance to the peer
* @param network this network will be used to reach the next hop
*/
-typedef void (*GNUNET_DV_DistanceChangedCallback)(void *cls,
- const struct GNUNET_PeerIdentity *peer,
- uint32_t distance,
- enum GNUNET_ATS_Network_Type network);
+typedef void
+(*GNUNET_DV_DistanceChangedCallback)(void *cls,
+ const struct GNUNET_PeerIdentity *peer,
+ uint32_t distance,
+ enum GNUNET_ATS_Network_Type network);
/**
* @param cls closure
* @param peer peer that disconnected
*/
-typedef void (*GNUNET_DV_DisconnectCallback)(void *cls,
- const struct GNUNET_PeerIdentity *peer);
+typedef void
+(*GNUNET_DV_DisconnectCallback)(void *cls,
+ const struct GNUNET_PeerIdentity *peer);
/**
* @param distance how far did the message travel
* @param msg actual message payload
*/
-typedef void (*GNUNET_DV_MessageReceivedCallback)(void *cls,
- const struct GNUNET_PeerIdentity *sender,
- uint32_t distance,
- const struct GNUNET_MessageHeader *msg);
+typedef void
+(*GNUNET_DV_MessageReceivedCallback)(void *cls,
+ const struct GNUNET_PeerIdentity *sender,
+ uint32_t distance,
+ const struct GNUNET_MessageHeader *msg);
/**
* message has been successful.
*
* @param cls closure
- * @param ok GNUNET_OK on success, GNUNET_SYSERR on error
*/
-typedef void (*GNUNET_DV_MessageSentCallback)(void *cls,
- int ok);
+typedef void
+(*GNUNET_DV_MessageSentCallback)(void *cls);
/**