diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh_connection.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index dfe4fa953..3f407f418 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -271,7 +271,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *connections; | |||
271 | static unsigned long long max_connections; | 271 | static unsigned long long max_connections; |
272 | 272 | ||
273 | /** | 273 | /** |
274 | * How many messages *in total* are we willing to queue, divide by number of | 274 | * How many messages *in total* are we willing to queue, divide by number of |
275 | * connections to get connection queue size. | 275 | * connections to get connection queue size. |
276 | */ | 276 | */ |
277 | static unsigned long long max_msgs_queue; | 277 | static unsigned long long max_msgs_queue; |
@@ -293,7 +293,7 @@ static struct GNUNET_CORE_Handle *core_handle; | |||
293 | * | 293 | * |
294 | * @param s Tunnel state. | 294 | * @param s Tunnel state. |
295 | * | 295 | * |
296 | * @return String representation. | 296 | * @return String representation. |
297 | */ | 297 | */ |
298 | static const char * | 298 | static const char * |
299 | GMC_DEBUG_state2s (enum MeshTunnelState s) | 299 | GMC_DEBUG_state2s (enum MeshTunnelState s) |
@@ -317,7 +317,7 @@ GMC_DEBUG_state2s (enum MeshTunnelState s) | |||
317 | 317 | ||
318 | /** | 318 | /** |
319 | * Initialize a Flow Control structure to the initial state. | 319 | * Initialize a Flow Control structure to the initial state. |
320 | * | 320 | * |
321 | * @param fc Flow Control structure to initialize. | 321 | * @param fc Flow Control structure to initialize. |
322 | */ | 322 | */ |
323 | static void | 323 | static void |
@@ -680,7 +680,7 @@ queue_add (void *cls, uint16_t type, size_t size, | |||
680 | GNUNET_break (0); | 680 | GNUNET_break (0); |
681 | return; | 681 | return; |
682 | } | 682 | } |
683 | 683 | ||
684 | if (NULL == peer->connections) | 684 | if (NULL == peer->connections) |
685 | { | 685 | { |
686 | /* We are not connected to this peer, ignore request. */ | 686 | /* We are not connected to this peer, ignore request. */ |
@@ -1172,9 +1172,9 @@ static unsigned int | |||
1172 | connection_get_buffer (struct MeshConnection *c, int fwd) | 1172 | connection_get_buffer (struct MeshConnection *c, int fwd) |
1173 | { | 1173 | { |
1174 | struct MeshFlowControl *fc; | 1174 | struct MeshFlowControl *fc; |
1175 | 1175 | ||
1176 | fc = fwd ? &c->fwd_fc : &c->bck_fc; | 1176 | fc = fwd ? &c->fwd_fc : &c->bck_fc; |
1177 | 1177 | ||
1178 | return (fc->queue_max - fc->queue_n); | 1178 | return (fc->queue_max - fc->queue_n); |
1179 | } | 1179 | } |
1180 | 1180 | ||
@@ -1337,7 +1337,7 @@ connection_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** Polling!\n"); | 1337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** Polling!\n"); |
1338 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** connection [%X]\n", | 1338 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** connection [%X]\n", |
1339 | GNUNET_h2s (&c->id)); | 1339 | GNUNET_h2s (&c->id)); |
1340 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** %s\n", | 1340 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** %s\n", |
1341 | fc == &c->fwd_fc ? "FWD" : "BCK"); | 1341 | fc == &c->fwd_fc ? "FWD" : "BCK"); |
1342 | 1342 | ||
1343 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_POLL); | 1343 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_POLL); |
@@ -1378,7 +1378,7 @@ connection_get_prev_hop (struct MeshConnection *c) | |||
1378 | * | 1378 | * |
1379 | * @param c Connection. | 1379 | * @param c Connection. |
1380 | * | 1380 | * |
1381 | * @return Next peer in the connection. | 1381 | * @return Next peer in the connection. |
1382 | */ | 1382 | */ |
1383 | static struct MeshPeer * | 1383 | static struct MeshPeer * |
1384 | connection_get_next_hop (struct MeshConnection *c) | 1384 | connection_get_next_hop (struct MeshConnection *c) |
@@ -1400,7 +1400,7 @@ connection_get_next_hop (struct MeshConnection *c) | |||
1400 | * @param c Connection. | 1400 | * @param c Connection. |
1401 | * @param fwd Next hop? | 1401 | * @param fwd Next hop? |
1402 | * | 1402 | * |
1403 | * @return Next peer in the connection. | 1403 | * @return Next peer in the connection. |
1404 | */ | 1404 | */ |
1405 | static struct MeshPeer * | 1405 | static struct MeshPeer * |
1406 | connection_get_hop (struct MeshConnection *c, int fwd) | 1406 | connection_get_hop (struct MeshConnection *c, int fwd) |
@@ -1598,7 +1598,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
1598 | * @param identity the public identity of this peer | 1598 | * @param identity the public identity of this peer |
1599 | */ | 1599 | */ |
1600 | static void | 1600 | static void |
1601 | core_init (void *cls, | 1601 | core_init (void *cls, |
1602 | const struct GNUNET_PeerIdentity *identity) | 1602 | const struct GNUNET_PeerIdentity *identity) |
1603 | { | 1603 | { |
1604 | const struct GNUNET_CONFIGURATION_Handle *c = cls; | 1604 | const struct GNUNET_CONFIGURATION_Handle *c = cls; |
@@ -2310,7 +2310,7 @@ handle_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2310 | return GNUNET_OK; | 2310 | return GNUNET_OK; |
2311 | } | 2311 | } |
2312 | 2312 | ||
2313 | fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? | 2313 | fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? |
2314 | GNUNET_YES : GNUNET_NO; | 2314 | GNUNET_YES : GNUNET_NO; |
2315 | 2315 | ||
2316 | /* Check if origin is as expected */ | 2316 | /* Check if origin is as expected */ |