aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/mesh_api.c')
-rw-r--r--src/mesh/mesh_api.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index d3dad49a4..2db89fc6e 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -188,7 +188,7 @@ struct GNUNET_MESH_Handle
188 * Time to the next reconnect in case one reconnect fails 188 * Time to the next reconnect in case one reconnect fails
189 */ 189 */
190 struct GNUNET_TIME_Relative reconnect_time; 190 struct GNUNET_TIME_Relative reconnect_time;
191 191
192 /** 192 /**
193 * Task for trying to reconnect. 193 * Task for trying to reconnect.
194 */ 194 */
@@ -373,9 +373,9 @@ th_is_payload (struct GNUNET_MESH_TransmitHandle *th)
373 373
374/** 374/**
375 * Check whether there is any message ready in the queue and find the size. 375 * Check whether there is any message ready in the queue and find the size.
376 * 376 *
377 * @param h Mesh handle. 377 * @param h Mesh handle.
378 * 378 *
379 * @return The size of the first ready message in the queue, 379 * @return The size of the first ready message in the queue,
380 * 0 if there is none. 380 * 0 if there is none.
381 */ 381 */
@@ -483,8 +483,8 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
483 GNUNET_break (0); 483 GNUNET_break (0);
484 return; 484 return;
485 } 485 }
486 LOG (GNUNET_ERROR_TYPE_DEBUG, 486 LOG (GNUNET_ERROR_TYPE_DEBUG,
487 "destroy_tunnel %X\n", 487 "destroy_tunnel %X\n",
488 t->tid); 488 t->tid);
489 h = t->mesh; 489 h = t->mesh;
490 490
@@ -508,7 +508,7 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
508 /* clean up request */ 508 /* clean up request */
509 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task) 509 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task)
510 GNUNET_SCHEDULER_cancel (th->timeout_task); 510 GNUNET_SCHEDULER_cancel (th->timeout_task);
511 GNUNET_free (th); 511 GNUNET_free (th);
512 } 512 }
513 513
514 /* if there are no more pending requests with mesh service, cancel active request */ 514 /* if there are no more pending requests with mesh service, cancel active request */
@@ -528,7 +528,7 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
528 528
529/** 529/**
530 * Notify client that the transmission has timed out 530 * Notify client that the transmission has timed out
531 * 531 *
532 * @param cls closure 532 * @param cls closure
533 * @param tc task context 533 * @param tc task context
534 */ 534 */
@@ -590,7 +590,7 @@ send_packet (struct GNUNET_MESH_Handle *h,
590 590
591/** 591/**
592 * Send an ack on the tunnel to confirm the processing of a message. 592 * Send an ack on the tunnel to confirm the processing of a message.
593 * 593 *
594 * @param t Tunnel on which to send the ACK. 594 * @param t Tunnel on which to send the ACK.
595 */ 595 */
596static void 596static void
@@ -702,7 +702,7 @@ do_reconnect (struct GNUNET_MESH_Handle *h)
702 GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_SECONDS, 702 GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_SECONDS,
703 GNUNET_TIME_relative_multiply 703 GNUNET_TIME_relative_multiply
704 (h->reconnect_time, 2)); 704 (h->reconnect_time, 2));
705 LOG (GNUNET_ERROR_TYPE_DEBUG, 705 LOG (GNUNET_ERROR_TYPE_DEBUG,
706 "Next retry in %s\n", 706 "Next retry in %s\n",
707 GNUNET_STRINGS_relative_time_to_string (h->reconnect_time, 707 GNUNET_STRINGS_relative_time_to_string (h->reconnect_time,
708 GNUNET_NO)); 708 GNUNET_NO));
@@ -916,7 +916,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
916 LOG (GNUNET_ERROR_TYPE_DEBUG, 916 LOG (GNUNET_ERROR_TYPE_DEBUG,
917 " %s data on tunnel %s [%X]\n", 917 " %s data on tunnel %s [%X]\n",
918 t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV ? "fwd" : "bck", 918 t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV ? "fwd" : "bck",
919 GNUNET_i2s (GNUNET_PEER_resolve2(t->peer)), 919 GNUNET_i2s (GNUNET_PEER_resolve2(t->peer)),
920 ntohl (dmsg->tid)); 920 ntohl (dmsg->tid));
921 type = ntohs (payload->type); 921 type = ntohs (payload->type);
922 LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %u\n", type); 922 LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %u\n", type);
@@ -948,7 +948,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
948/** 948/**
949 * Process a local ACK message, enabling the client to send 949 * Process a local ACK message, enabling the client to send
950 * more data to the service. 950 * more data to the service.
951 * 951 *
952 * @param h Mesh handle. 952 * @param h Mesh handle.
953 * @param message Message itself. 953 * @param message Message itself.
954 */ 954 */
@@ -1082,7 +1082,7 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg)
1082 1082
1083 if (msg == NULL) 1083 if (msg == NULL)
1084 { 1084 {
1085 LOG (GNUNET_ERROR_TYPE_DEBUG, 1085 LOG (GNUNET_ERROR_TYPE_DEBUG,
1086 "Mesh service disconnected, reconnecting\n", h); 1086 "Mesh service disconnected, reconnecting\n", h);
1087 reconnect (h); 1087 reconnect (h);
1088 return; 1088 return;
@@ -1265,7 +1265,7 @@ send_callback (void *cls, size_t size, void *buf)
1265 * Auxiliary function to send an already constructed packet to the service. 1265 * Auxiliary function to send an already constructed packet to the service.
1266 * Takes care of creating a new queue element, copying the message and 1266 * Takes care of creating a new queue element, copying the message and
1267 * calling the tmt_rdy function if necessary. 1267 * calling the tmt_rdy function if necessary.
1268 * 1268 *
1269 * @param h mesh handle 1269 * @param h mesh handle
1270 * @param msg message to transmit 1270 * @param msg message to transmit
1271 * @param tunnel tunnel this send is related to (NULL if N/A) 1271 * @param tunnel tunnel this send is related to (NULL if N/A)
@@ -1441,7 +1441,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle)
1441 * @return handle to the tunnel 1441 * @return handle to the tunnel
1442 */ 1442 */
1443struct GNUNET_MESH_Tunnel * 1443struct GNUNET_MESH_Tunnel *
1444GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, 1444GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
1445 void *tunnel_ctx, 1445 void *tunnel_ctx,
1446 const struct GNUNET_PeerIdentity *peer, 1446 const struct GNUNET_PeerIdentity *peer,
1447 uint32_t port, 1447 uint32_t port,
@@ -1723,7 +1723,7 @@ static size_t
1723mesh_mq_ntr (void *cls, size_t size, 1723mesh_mq_ntr (void *cls, size_t size,
1724 void *buf) 1724 void *buf)
1725{ 1725{
1726 struct GNUNET_MQ_Handle *mq = cls; 1726 struct GNUNET_MQ_Handle *mq = cls;
1727 struct MeshMQState *state = GNUNET_MQ_impl_state (mq); 1727 struct MeshMQState *state = GNUNET_MQ_impl_state (mq);
1728 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq); 1728 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq);
1729 uint16_t msize; 1729 uint16_t msize;
@@ -1769,7 +1769,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1769 GNUNET_MESH_notify_transmit_ready (state->tunnel, 1769 GNUNET_MESH_notify_transmit_ready (state->tunnel,
1770 /* FIXME: add option for corking */ 1770 /* FIXME: add option for corking */
1771 GNUNET_NO, 1771 GNUNET_NO,
1772 GNUNET_TIME_UNIT_FOREVER_REL, 1772 GNUNET_TIME_UNIT_FOREVER_REL,
1773 ntohs (msg->size), 1773 ntohs (msg->size),
1774 mesh_mq_ntr, mq); 1774 mesh_mq_ntr, mq);
1775 1775
@@ -1781,7 +1781,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1781 * destruction of a message queue. 1781 * destruction of a message queue.
1782 * Implementations must not free 'mq', but should 1782 * Implementations must not free 'mq', but should
1783 * take care of 'impl_state'. 1783 * take care of 'impl_state'.
1784 * 1784 *
1785 * @param mq the message queue to destroy 1785 * @param mq the message queue to destroy
1786 * @param impl_state state of the implementation 1786 * @param impl_state state of the implementation
1787 */ 1787 */