aboutsummaryrefslogtreecommitdiff
path: root/src/dv
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-05 12:41:49 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-05 12:41:49 +0000
commit1f3219c222bb206e02a793e6c7d48ccc3045d604 (patch)
tree4ca96c6f9818c75651be78feff42ac7023cedd82 /src/dv
parent3f1bdbec8a40c36da13fd2488e67b8daba49025c (diff)
downloadgnunet-1f3219c222bb206e02a793e6c7d48ccc3045d604.tar.gz
gnunet-1f3219c222bb206e02a793e6c7d48ccc3045d604.zip
indentation, moving API towards MQ-style
Diffstat (limited to 'src/dv')
-rw-r--r--src/dv/dv_api.c9
-rw-r--r--src/dv/gnunet-service-dv.c5
-rw-r--r--src/dv/plugin_transport_dv.c6
3 files changed, 8 insertions, 12 deletions
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c
index e3ba995c3..d74453376 100644
--- a/src/dv/dv_api.c
+++ b/src/dv/dv_api.c
@@ -308,7 +308,7 @@ cleanup_send_cb (void *cls,
308 while (NULL != (th = peer->head)) 308 while (NULL != (th = peer->head))
309 { 309 {
310 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, th); 310 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, th);
311 th->cb (th->cb_cls, GNUNET_SYSERR); 311 th->cb (th->cb_cls);
312 GNUNET_free (th); 312 GNUNET_free (th);
313 } 313 }
314 GNUNET_free (peer); 314 GNUNET_free (peer);
@@ -416,7 +416,7 @@ handle_message_receipt (void *cls,
416 GNUNET_CONTAINER_DLL_remove (sh->th_head, 416 GNUNET_CONTAINER_DLL_remove (sh->th_head,
417 sh->th_tail, 417 sh->th_tail,
418 th); 418 th);
419 th->cb (th->cb_cls, GNUNET_SYSERR); 419 th->cb (th->cb_cls);
420 GNUNET_free (th); 420 GNUNET_free (th);
421 } 421 }
422 } 422 }
@@ -473,10 +473,7 @@ handle_message_receipt (void *cls,
473 GNUNET_CONTAINER_DLL_remove (peer->head, 473 GNUNET_CONTAINER_DLL_remove (peer->head,
474 peer->tail, 474 peer->tail,
475 th); 475 th);
476 th->cb (th->cb_cls, 476 th->cb (th->cb_cls);
477 (ntohs (ack->header.type) == GNUNET_MESSAGE_TYPE_DV_SEND_ACK)
478 ? GNUNET_OK
479 : GNUNET_SYSERR);
480 GNUNET_free (th); 477 GNUNET_free (th);
481 break; 478 break;
482 } 479 }
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index fd51a8562..af6ddb3d9 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -230,7 +230,7 @@ struct DirectNeighbor
230 * ID of the task we use to (periodically) update our consensus 230 * ID of the task we use to (periodically) update our consensus
231 * with this peer. Used if we are the initiating peer. 231 * with this peer. Used if we are the initiating peer.
232 */ 232 */
233 struct GNUNET_SCHEDULER_Task * initiate_task; 233 struct GNUNET_SCHEDULER_Task *initiate_task;
234 234
235 /** 235 /**
236 * At what offset are we, with respect to inserting our own routes 236 * At what offset are we, with respect to inserting our own routes
@@ -1905,7 +1905,8 @@ handle_dv_route_message (void *cls,
1905 * @param message the actual message 1905 * @param message the actual message
1906 */ 1906 */
1907static void 1907static void
1908handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client, 1908handle_dv_send_message (void *cls,
1909 struct GNUNET_SERVER_Client *client,
1909 const struct GNUNET_MessageHeader *message) 1910 const struct GNUNET_MessageHeader *message)
1910{ 1911{
1911 struct Route *route; 1912 struct Route *route;
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index aa94bed31..7293d9fb8 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -519,11 +519,9 @@ handle_dv_disconnect (void *cls,
519 * Clean up the pending request, and call continuations. 519 * Clean up the pending request, and call continuations.
520 * 520 *
521 * @param cls closure 521 * @param cls closure
522 * @param ok #GNUNET_OK on success, #GNUNET_SYSERR on error
523 */ 522 */
524static void 523static void
525send_finished (void *cls, 524send_finished (void *cls)
526 int ok)
527{ 525{
528 struct PendingRequest *pr = cls; 526 struct PendingRequest *pr = cls;
529 struct GNUNET_ATS_Session *session = pr->session; 527 struct GNUNET_ATS_Session *session = pr->session;
@@ -535,7 +533,7 @@ send_finished (void *cls,
535 if (NULL != pr->transmit_cont) 533 if (NULL != pr->transmit_cont)
536 pr->transmit_cont (pr->transmit_cont_cls, 534 pr->transmit_cont (pr->transmit_cont_cls,
537 &session->sender, 535 &session->sender,
538 ok, 536 GNUNET_OK,
539 pr->size, 0); 537 pr->size, 0);
540 GNUNET_free (pr); 538 GNUNET_free (pr);
541} 539}