From 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Jul 2020 00:44:39 +0200 Subject: merge flags into enum for GNUNET_DISK_pipe() API, fixing #6188 --- src/transport/gnunet-communicator-tcp.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/transport/gnunet-communicator-tcp.c') diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index e25cdf139..177b5c26c 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c @@ -577,7 +577,6 @@ struct Addresses }; - /** * Maximum queue length before we stop reading towards the transport service. */ @@ -1203,6 +1202,7 @@ queue_read (void *cls) queue_finish (queue); } + /** * Convert a `struct sockaddr_in6 to a `struct sockaddr *` * @@ -1234,6 +1234,7 @@ tcp_address_to_sockaddr_numeric_v6 (socklen_t *sock_len, struct sockaddr_in6 v6, return in; } + /** * Convert a `struct sockaddr_in4 to a `struct sockaddr *` * @@ -1257,6 +1258,7 @@ tcp_address_to_sockaddr_numeric_v4 (socklen_t *sock_len, struct sockaddr_in v4, return in; } + /** * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` * @@ -1318,6 +1320,7 @@ tcp_address_to_sockaddr_port_only (const char *bindto, unsigned int *port) return po; } + /** * This Method extracts the address part of the BINDTO string. * @@ -1344,7 +1347,8 @@ extract_address (const char *bindto) start++; /* skip over '['*/ cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ } - else { + else + { token = strtok_r (cp, "]", &rest); if (strlen (bindto) == strlen (token)) { @@ -1362,6 +1366,7 @@ extract_address (const char *bindto) return start; } + /** * This Method extracts the port part of the BINDTO string. * @@ -1440,6 +1445,7 @@ extract_port (const char *addr_and_port) return port; } + /** * Convert TCP bind specification to a `struct sockaddr *` * @@ -2140,6 +2146,7 @@ queue_read_kx (void *cls) queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); } + /** * Function called by the transport service to initialize a * message queue given address information about another peer. @@ -2229,6 +2236,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) return GNUNET_OK; } + /** * Iterator over all message queues to clean up. * @@ -2367,6 +2375,7 @@ nat_address_cb (void *cls, } } + /** * This method launch network interactions for each address we like to bind to. * @@ -2474,7 +2483,7 @@ init_socket (const struct sockaddr *addr, if (NULL == queue_map) queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); - if (NULL == ch ) + if (NULL == ch) ch = GNUNET_TRANSPORT_communicator_connect (cfg, COMMUNICATOR_CONFIG_SECTION, COMMUNICATOR_ADDRESS_PREFIX, @@ -2496,6 +2505,7 @@ init_socket (const struct sockaddr *addr, } + /** * This method reads from the DLL addrs_head to register them at the NAT service. */ @@ -2557,6 +2567,7 @@ nat_register () } } + /** * This method adds addresses to the DLL, that are later register at the NAT service. */ @@ -2573,6 +2584,7 @@ add_addr (struct sockaddr *in, socklen_t in_len) addrs_lens++; } + /** * This method is the callback called by the resolver API, and wraps method init_socket. * @@ -2625,6 +2637,7 @@ init_socket_resolv (void *cls, } } + /** * Setup communicator and launch network interactions. * -- cgit v1.2.3