[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37459 - in gnunet/src: dv include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37459 - in gnunet/src: dv include |
Date: |
Tue, 5 Jul 2016 14:41:50 +0200 |
Author: grothoff
Date: 2016-07-05 14:41:49 +0200 (Tue, 05 Jul 2016)
New Revision: 37459
Modified:
gnunet/src/dv/dv_api.c
gnunet/src/dv/gnunet-service-dv.c
gnunet/src/dv/plugin_transport_dv.c
gnunet/src/include/gnunet_dv_service.h
Log:
indentation, moving API towards MQ-style
Modified: gnunet/src/dv/dv_api.c
===================================================================
--- gnunet/src/dv/dv_api.c 2016-07-05 12:33:25 UTC (rev 37458)
+++ gnunet/src/dv/dv_api.c 2016-07-05 12:41:49 UTC (rev 37459)
@@ -308,7 +308,7 @@
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);
@@ -416,7 +416,7 @@
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);
}
}
@@ -473,10 +473,7 @@
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;
}
Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c 2016-07-05 12:33:25 UTC (rev 37458)
+++ gnunet/src/dv/gnunet-service-dv.c 2016-07-05 12:41:49 UTC (rev 37459)
@@ -230,7 +230,7 @@
* 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
@@ -1905,7 +1905,8 @@
* @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;
Modified: gnunet/src/dv/plugin_transport_dv.c
===================================================================
--- gnunet/src/dv/plugin_transport_dv.c 2016-07-05 12:33:25 UTC (rev 37458)
+++ gnunet/src/dv/plugin_transport_dv.c 2016-07-05 12:41:49 UTC (rev 37459)
@@ -519,11 +519,9 @@
* 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;
@@ -535,7 +533,7 @@
if (NULL != pr->transmit_cont)
pr->transmit_cont (pr->transmit_cont_cls,
&session->sender,
- ok,
+ GNUNET_OK,
pr->size, 0);
GNUNET_free (pr);
}
Modified: gnunet/src/include/gnunet_dv_service.h
===================================================================
--- gnunet/src/include/gnunet_dv_service.h 2016-07-05 12:33:25 UTC (rev
37458)
+++ gnunet/src/include/gnunet_dv_service.h 2016-07-05 12:41:49 UTC (rev
37459)
@@ -45,10 +45,11 @@
* @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);
/**
@@ -60,10 +61,11 @@
* @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);
/**
@@ -73,8 +75,9 @@
* @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);
/**
@@ -86,10 +89,11 @@
* @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);
/**
@@ -97,10 +101,9 @@
* 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);
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37459 - in gnunet/src: dv include,
gnunet <=