[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: - removed use of GNUNET_free_non_null
From: |
gnunet |
Subject: |
[gnunet] branch master updated: - removed use of GNUNET_free_non_null |
Date: |
Tue, 21 Jul 2020 13:00:22 +0200 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 422e7a031 - removed use of GNUNET_free_non_null
422e7a031 is described below
commit 422e7a0319bbb6e8ae87d5d37ed5674b4daf1bcb
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Tue Jul 21 12:54:09 2020 +0200
- removed use of GNUNET_free_non_null
---
src/transport/gnunet-communicator-tcp.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/src/transport/gnunet-communicator-tcp.c
b/src/transport/gnunet-communicator-tcp.c
index ec9f5986a..880145424 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -707,6 +707,7 @@ struct Addresses
};
+
/**
* Maximum queue length before we stop reading towards the transport service.
*/
@@ -1617,7 +1618,6 @@ queue_read (void *cls)
queue_finish (queue);
}
-
/**
* Convert a `struct sockaddr_in6 to a `struct sockaddr *`
*
@@ -1642,7 +1642,6 @@ 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 *`
*
@@ -1666,7 +1665,6 @@ tcp_address_to_sockaddr_numeric_v4 (socklen_t *sock_len,
struct sockaddr_in v4,
return in;
}
-
/**
* Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *`
*
@@ -1726,7 +1724,6 @@ tcp_address_to_sockaddr_port_only (const char *bindto,
unsigned int *port)
return po;
}
-
/**
* This Method extracts the address part of the BINDTO string.
*
@@ -1753,8 +1750,7 @@ 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))
{
@@ -1772,7 +1768,6 @@ extract_address (const char *bindto)
return start;
}
-
/**
* This Method extracts the port part of the BINDTO string.
*
@@ -1851,7 +1846,6 @@ extract_port (const char *addr_and_port)
return port;
}
-
/**
* Convert TCP bind specification to a `struct sockaddr *`
*
@@ -2689,7 +2683,6 @@ 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.
@@ -2784,7 +2777,6 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity
*peer, const char *address)
return GNUNET_OK;
}
-
/**
* Iterator over all message queues to clean up.
*
@@ -2919,7 +2911,6 @@ nat_address_cb (void *cls,
}
}
-
/**
* This method launch network interactions for each address we like to bind to.
*
@@ -3024,7 +3015,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,
@@ -3047,7 +3038,6 @@ init_socket (const struct sockaddr *addr,
}
-
/**
* This method reads from the DLL addrs_head to register them at the NAT
service.
*/
@@ -3090,8 +3080,8 @@ nat_register ()
/*for (i = addrs_lens - 1; i >= 0; i--)
GNUNET_free (saddrs[i]);*/
- GNUNET_free_non_null (saddrs);
- GNUNET_free_non_null (saddr_lens);
+ GNUNET_free (saddrs);
+ GNUNET_free (saddr_lens);
if (NULL == nat)
{
@@ -3102,7 +3092,6 @@ nat_register ()
}
}
-
/**
* This method adds addresses to the DLL, that are later register at the NAT
service.
*/
@@ -3119,7 +3108,6 @@ 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.
*
@@ -3172,7 +3160,6 @@ init_socket_resolv (void *cls,
}
}
-
/**
* Setup communicator and launch network interactions.
*
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: - removed use of GNUNET_free_non_null,
gnunet <=