summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
committert3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
commit5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7 (patch)
treec26167460724fea683ef51a88ffd93d1fa830412 /src/transport
parent17d84245fdfeeb1a6da4ffb97898903cb55f702c (diff)
parent7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (diff)
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/Makefile.am12
-rw-r--r--src/transport/gnunet-communicator-tcp.c19
-rw-r--r--src/transport/gnunet-communicator-udp.c5
-rw-r--r--src/transport/gnunet-communicator-unix.c5
-rw-r--r--src/transport/gnunet-service-transport.c8
-rw-r--r--src/transport/gnunet-service-transport_hello.c2
-rw-r--r--src/transport/gnunet-transport.c6
-rw-r--r--src/transport/plugin_transport_http_client.c12
-rw-r--r--src/transport/plugin_transport_http_common.c18
-rw-r--r--src/transport/plugin_transport_http_server.c38
-rw-r--r--src/transport/plugin_transport_smtp.c6
-rw-r--r--src/transport/plugin_transport_tcp.c28
-rw-r--r--src/transport/plugin_transport_udp.c4
-rw-r--r--src/transport/plugin_transport_wlan.c2
-rw-r--r--src/transport/tcp_connection_legacy.c4
-rw-r--r--src/transport/tcp_service_legacy.c52
-rw-r--r--src/transport/test_http_common.c6
-rw-r--r--src/transport/test_plugin_hostkey.eccbin827 -> 32 bytes
-rw-r--r--src/transport/test_transport_api_reliability.c5
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf8
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf10
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf8
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf9
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf10
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf8
-rw-r--r--src/transport/transport-testing-main.c2
-rw-r--r--src/transport/transport-testing.c6
-rw-r--r--src/transport/transport-testing2.c28
-rw-r--r--src/transport/transport.h1
-rw-r--r--src/transport/transport_api2_communication.c3
-rw-r--r--src/transport/transport_api2_core.c4
-rw-r--r--src/transport/transport_api_core.c9
32 files changed, 183 insertions, 155 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 127ba9516..e0369059d 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -155,7 +155,15 @@ libgnunettransporttesting_la_LIBADD = \
$(top_builddir)/src/ats/libgnunetats.la \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/arm/libgnunetarm.la \
$(GN_LIBINTL)
+libgnunettransporttesting_la_DEPENDENCIES = \
+ libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/arm/libgnunetarm.la
libgnunettransporttesting_la_LDFLAGS = \
$(GN_LIB_LDFLAGS)
@@ -185,6 +193,10 @@ libgnunettransport_la_LIBADD = \
$(top_builddir)/src/ats/libgnunetats.la \
$(top_builddir)/src/util/libgnunetutil.la \
$(GN_LIBINTL)
+libgnunettransport_la_DEPENDENCIES = \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
+ $(top_builddir)/src/util/libgnunetutil.la
libgnunettransport_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) \
-version-info 4:0:2
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index 9da14dcb0..ec9f5986a 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -707,7 +707,6 @@ struct Addresses
};
-
/**
* Maximum queue length before we stop reading towards the transport service.
*/
@@ -1618,6 +1617,7 @@ queue_read (void *cls)
queue_finish (queue);
}
+
/**
* Convert a `struct sockaddr_in6 to a `struct sockaddr *`
*
@@ -1642,6 +1642,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 *`
*
@@ -1665,6 +1666,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 *`
*
@@ -1724,6 +1726,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.
*
@@ -1750,7 +1753,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))
{
@@ -1768,6 +1772,7 @@ extract_address (const char *bindto)
return start;
}
+
/**
* This Method extracts the port part of the BINDTO string.
*
@@ -1846,6 +1851,7 @@ extract_port (const char *addr_and_port)
return port;
}
+
/**
* Convert TCP bind specification to a `struct sockaddr *`
*
@@ -2683,6 +2689,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.
@@ -2777,6 +2784,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address)
return GNUNET_OK;
}
+
/**
* Iterator over all message queues to clean up.
*
@@ -2911,6 +2919,7 @@ nat_address_cb (void *cls,
}
}
+
/**
* This method launch network interactions for each address we like to bind to.
*
@@ -3015,7 +3024,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,
@@ -3038,6 +3047,7 @@ init_socket (const struct sockaddr *addr,
}
+
/**
* This method reads from the DLL addrs_head to register them at the NAT service.
*/
@@ -3092,6 +3102,7 @@ nat_register ()
}
}
+
/**
* This method adds addresses to the DLL, that are later register at the NAT service.
*/
@@ -3108,6 +3119,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.
*
@@ -3160,6 +3172,7 @@ init_socket_resolv (void *cls,
}
}
+
/**
* Setup communicator and launch network interactions.
*
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 585b29c2d..03c120cc9 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -783,7 +783,7 @@ bi_destroy (struct BroadcastInterface *bi)
GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi);
GNUNET_SCHEDULER_cancel (bi->broadcast_task);
GNUNET_free (bi->sa);
- GNUNET_free_non_null (bi->ba);
+ GNUNET_free (bi->ba);
GNUNET_free (bi);
}
@@ -1309,7 +1309,8 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
"Tell transport we have more acks!\n");
GNUNET_TRANSPORT_communicator_mq_update (ch,
receiver->d_qh,
- (allowed - ss->sequence_allowed),
+ (allowed
+ - ss->sequence_allowed),
1);
ss->sequence_allowed = allowed;
/* move ss to head to avoid discarding it anytime soon! */
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c
index 6ea0ea360..d7e18f87a 100644
--- a/src/transport/gnunet-communicator-unix.c
+++ b/src/transport/gnunet-communicator-unix.c
@@ -673,7 +673,8 @@ setup_queue (const struct GNUNET_PeerIdentity *target,
queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch,
&queue->target,
foreign_addr,
- UNIX_MTU - sizeof (struct UNIXMessage),
+ UNIX_MTU - sizeof (struct
+ UNIXMessage),
GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED,
0,
GNUNET_NT_LOOPBACK,
@@ -799,7 +800,7 @@ select_read_cb (void *cls)
/* ensure aligned access */
memcpy (&al_hdr, currhdr, sizeof(al_hdr));
if ((tsize < sizeof(struct GNUNET_MessageHeader)) ||
- (tsize != ntohs(al_hdr.size)))
+ (tsize != ntohs (al_hdr.size)))
{
GNUNET_break_op (0);
return;
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 93fa031f4..207c17f2f 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -727,9 +727,9 @@ handle_send_transmit_continuation (void *cls,
stcc->uuid);
send_ok_msg.header.size = htons (sizeof(send_ok_msg));
send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK);
- send_ok_msg.bytes_msg = htonl (bytes_payload);
+ send_ok_msg.bytes_msg = htons (bytes_payload);
send_ok_msg.bytes_physical = htonl (bytes_on_wire);
- send_ok_msg.success = htonl (success);
+ send_ok_msg.success = htons (success);
send_ok_msg.peer = stcc->target;
unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO);
}
@@ -2108,7 +2108,7 @@ free_blacklist_entry (void *cls,
{
char *be = value;
- GNUNET_free_non_null (be);
+ GNUNET_free (be);
return GNUNET_OK;
}
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc)
GNUNET_SCHEDULER_cancel (bc->task);
bc->task = NULL;
}
- GNUNET_free_non_null (bc->address);
+ GNUNET_free (bc->address);
GNUNET_free (bc);
}
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index ed6565d23..472c77c27 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -182,7 +182,7 @@ refresh_hello_task (void *cls)
gc.addr_pos = oal_head;
gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
- GNUNET_free_non_null (our_hello);
+ GNUNET_free (our_hello);
our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
&address_generator,
&gc,
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 35da5ec10..0d71e1ff9 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -339,7 +339,7 @@ destroy_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
GNUNET_assert (
GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value));
- GNUNET_free_non_null (m->address);
+ GNUNET_free (m->address);
GNUNET_free (value);
return GNUNET_OK;
}
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls,
GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
addr->asc = NULL;
}
- GNUNET_free_non_null (addr->str);
+ GNUNET_free (addr->str);
GNUNET_free (addr);
*session_ctx = NULL;
}
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls,
GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
addr->asc = NULL;
}
- GNUNET_free_non_null (addr->str);
+ GNUNET_free (addr->str);
GNUNET_free (addr);
*session_ctx = NULL;
}
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 87cd7ead2..92ed2fe52 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -2207,9 +2207,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
_ ("Shutdown for plugin `%s' complete\n"),
plugin->name);
GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
- GNUNET_free_non_null (plugin->proxy_hostname);
- GNUNET_free_non_null (plugin->proxy_username);
- GNUNET_free_non_null (plugin->proxy_password);
+ GNUNET_free (plugin->proxy_hostname);
+ GNUNET_free (plugin->proxy_username);
+ GNUNET_free (plugin->proxy_password);
GNUNET_free (plugin);
GNUNET_free (api);
return NULL;
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
GNUNET_free (proxy_type);
GNUNET_free (plugin->proxy_hostname);
plugin->proxy_hostname = NULL;
- GNUNET_free_non_null (plugin->proxy_username);
+ GNUNET_free (plugin->proxy_username);
plugin->proxy_username = NULL;
- GNUNET_free_non_null (plugin->proxy_password);
+ GNUNET_free (plugin->proxy_password);
plugin->proxy_password = NULL;
return GNUNET_SYSERR;
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel)
plugin->proxy_use_httpproxytunnel = GNUNET_NO;
- GNUNET_free_non_null (proxy_type);
+ GNUNET_free (proxy_type);
}
/* Should we emulate an XHR client for testing? */
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index 2bcab42b4..d81d6db9c 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -34,10 +34,10 @@ http_clean_splitted (struct SplittedHTTPAddress *spa)
{
if (NULL != spa)
{
- GNUNET_free_non_null (spa->protocol);
- GNUNET_free_non_null (spa->host);
- GNUNET_free_non_null (spa->path);
- GNUNET_free_non_null (spa);
+ GNUNET_free (spa->protocol);
+ GNUNET_free (spa->host);
+ GNUNET_free (spa->path);
+ GNUNET_free (spa);
}
}
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
asc (asc_cls, NULL, GNUNET_OK);
http_clean_splitted (saddr);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_YES == numeric) &&
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
goto handle_error;
}
/* Wait for resolver callback */
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_NO == numeric) &&
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
goto handle_error;
}
/* Wait for resolver callback */
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_NO == numeric) &&
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
ret = http_common_plugin_address_to_string (type, address, addrlen);
asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
asc (asc_cls, NULL, GNUNET_OK);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
http_clean_splitted (saddr);
return;
}
@@ -553,7 +553,7 @@ handle_error:
/* Report error */
asc (asc_cls, NULL, GNUNET_SYSERR);
asc (asc_cls, NULL, GNUNET_OK);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
if (NULL != saddr)
http_clean_splitted (saddr);
}
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index eef83b29d..d1b21ba9c 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1495,7 +1495,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
http_common_plugin_address_to_string (plugin->protocol,
addr,
addr_len));
- GNUNET_free_non_null (addr);
+ GNUNET_free (addr);
}
if ((_RECEIVE == direction) &&
@@ -2179,16 +2179,16 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
{
struct GNUNET_OS_Process *cert_creation;
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"No usable TLS certificate found, creating certificate\n");
errno = 0;
cert_creation =
- GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, NULL,
"gnunet-transport-certificate-creation",
"gnunet-transport-certificate-creation",
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
GNUNET_free (key_file);
GNUNET_free (cert_file);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
- GNUNET_free_non_null (plugin->crypto_init);
+ GNUNET_free (plugin->crypto_init);
plugin->crypto_init = NULL;
return GNUNET_SYSERR;
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
GNUNET_free (key_file);
GNUNET_free (cert_file);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
- GNUNET_free_non_null (plugin->crypto_init);
+ GNUNET_free (plugin->crypto_init);
plugin->crypto_init = NULL;
return GNUNET_SYSERR;
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin)
GNUNET_assert (NULL != addrs[res]);
GNUNET_free (addrs[res]);
}
- GNUNET_free_non_null (addrs);
- GNUNET_free_non_null (addrlens);
+ GNUNET_free (addrs);
+ GNUNET_free (addrlens);
}
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
plugin->server_v6_task = NULL;
}
#if BUILD_HTTPS
- GNUNET_free_non_null (plugin->crypto_init);
- GNUNET_free_non_null (plugin->cert);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->crypto_init);
+ GNUNET_free (plugin->cert);
+ GNUNET_free (plugin->key);
#endif
GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions,
&destroy_session_shutdown_cb,
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
plugin->server_v6 = NULL;
}
/* Clean up */
- GNUNET_free_non_null (plugin->external_hostname);
- GNUNET_free_non_null (plugin->ext_addr);
- GNUNET_free_non_null (plugin->server_addr_v4);
- GNUNET_free_non_null (plugin->server_addr_v6);
+ GNUNET_free (plugin->external_hostname);
+ GNUNET_free (plugin->ext_addr);
+ GNUNET_free (plugin->server_addr_v4);
+ GNUNET_free (plugin->server_addr_v6);
regfree (&plugin->url_regex);
LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c
index 330023118..f3db4fc5a 100644
--- a/src/transport/plugin_transport_smtp.c
+++ b/src/transport/plugin_transport_smtp.c
@@ -174,9 +174,9 @@ listenAndDistribute (void *unused)
goto END; \
} \
if (core_api->load_monitor != NULL) \
- GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \
- GNUNET_ND_DOWNLOAD, \
- strlen (retl)); \
+ GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \
+ GNUNET_ND_DOWNLOAD, \
+ strlen (retl)); \
} while (0)
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 4cec181b0..e3bc21543 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1186,7 +1186,7 @@ get_server_addresses (const char *service_name,
(EACCES == errno))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name,
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name,
saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
add_unixpath (saddrs, saddrlens, unixpath, abstract);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name,
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name,
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name,
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls,
else
{
GNUNET_break (0);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
}
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls,
GNUNET_a2s (vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
return;
}
if (GNUNET_YES == session->expecting_welcome)
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls,
GNUNET_a2s (vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
return;
}
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls,
(unsigned int) ntohs (message->type),
GNUNET_i2s (&session->target),
GNUNET_a2s (vaddr, alen));
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
}
GNUNET_STATISTICS_update (plugin->env->stats,
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls)
plugin);
for (ret = ret_s - 1; ret >= 0; ret--)
GNUNET_free (addrs[ret]);
- GNUNET_free_non_null (addrs);
- GNUNET_free_non_null (addrlens);
+ GNUNET_free (addrs);
+ GNUNET_free (addrlens);
}
else
{
@@ -3893,7 +3893,7 @@ die:
if (NULL != service)
LEGACY_SERVICE_stop (service);
GNUNET_free (plugin);
- GNUNET_free_non_null (api);
+ GNUNET_free (api);
return NULL;
}
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index ef4fddb24..ec3a0edd8 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -3669,7 +3669,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
}
have_bind4 = GNUNET_YES;
}
- GNUNET_free_non_null (bind4_address);
+ GNUNET_free (bind4_address);
have_bind6 = GNUNET_NO;
memset (&server_addrv6, 0, sizeof(server_addrv6));
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
}
have_bind6 = GNUNET_YES;
}
- GNUNET_free_non_null (bind6_address);
+ GNUNET_free (bind6_address);
enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
"transport-udp",
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 17d72135b..74b8d5a8a 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -2093,7 +2093,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer);
plugin->helper_payload_tokenizer = NULL;
}
- GNUNET_free_non_null (plugin->wlan_interface);
+ GNUNET_free (plugin->wlan_interface);
GNUNET_free (plugin);
GNUNET_free (api);
return NULL;
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 4e8c8140d..3e173b8a4 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -1088,8 +1088,8 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection)
* leak the socket in this special case) ... */
}
}
- GNUNET_free_non_null (connection->addr);
- GNUNET_free_non_null (connection->hostname);
+ GNUNET_free (connection->addr);
+ GNUNET_free (connection->hostname);
GNUNET_free (connection->write_buffer);
GNUNET_free (connection);
}
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index fb4e9c3c9..12dce3993 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -657,7 +657,7 @@ LEGACY_SERVICE_get_server_addresses (
(EACCES == errno))
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses (
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses (
saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
add_unixpath (saddrs, saddrlens, unixpath, abstract);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses (
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses (
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses (
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir);
GNUNET_free (rdir);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
GNUNET_free (pif);
return GNUNET_SYSERR;
}
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif);
GNUNET_free (pif);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
return GNUNET_SYSERR;
}
if (0 > fprintf (pidfd, "%u", pid))
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
GNUNET_break (0 == fclose (pidfd));
if ((NULL != user) && (0 < strlen (user)))
GNUNET_DISK_file_change_owner (pif, user);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
GNUNET_free (pif);
return GNUNET_OK;
}
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc,
/* shutdown */
if ((1 == do_daemonize) && (NULL != sctx.server))
pid_file_delete (&sctx);
- GNUNET_free_non_null (sctx.my_handlers);
+ GNUNET_free (sctx.my_handlers);
shutdown:
if (-1 != sctx.ready_confirm_fd)
@@ -1475,16 +1475,16 @@ shutdown:
if (NULL != sctx.addrs)
while (NULL != sctx.addrs[i])
GNUNET_free_nz (sctx.addrs[i++]);
- GNUNET_free_non_null (sctx.addrs);
- GNUNET_free_non_null (sctx.addrlens);
- GNUNET_free_non_null (logfile);
- GNUNET_free_non_null (loglev);
+ GNUNET_free (sctx.addrs);
+ GNUNET_free (sctx.addrlens);
+ GNUNET_free (logfile);
+ GNUNET_free (loglev);
GNUNET_free (cfg_fn);
- GNUNET_free_non_null (opt_cfg_fn);
- GNUNET_free_non_null (sctx.v4_denied);
- GNUNET_free_non_null (sctx.v6_denied);
- GNUNET_free_non_null (sctx.v4_allowed);
- GNUNET_free_non_null (sctx.v6_allowed);
+ GNUNET_free (opt_cfg_fn);
+ GNUNET_free (sctx.v4_denied);
+ GNUNET_free (sctx.v6_denied);
+ GNUNET_free (sctx.v4_allowed);
+ GNUNET_free (sctx.v6_allowed);
return err ? GNUNET_SYSERR : sctx.ret;
}
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
}
if (NULL != sctx->server)
GNUNET_SERVER_destroy (sctx->server);
- GNUNET_free_non_null (sctx->my_handlers);
+ GNUNET_free (sctx->my_handlers);
if (NULL != sctx->addrs)
{
i = 0;
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
GNUNET_free_nz (sctx->addrs[i++]);
GNUNET_free (sctx->addrs);
}
- GNUNET_free_non_null (sctx->addrlens);
- GNUNET_free_non_null (sctx->v4_denied);
- GNUNET_free_non_null (sctx->v6_denied);
- GNUNET_free_non_null (sctx->v4_allowed);
- GNUNET_free_non_null (sctx->v6_allowed);
+ GNUNET_free (sctx->addrlens);
+ GNUNET_free (sctx->v4_denied);
+ GNUNET_free (sctx->v6_denied);
+ GNUNET_free (sctx->v4_allowed);
+ GNUNET_free (sctx->v6_allowed);
GNUNET_free (sctx);
}
diff --git a/src/transport/test_http_common.c b/src/transport/test_http_common.c
index 6e31ec85e..fe6e4faa3 100644
--- a/src/transport/test_http_common.c
+++ b/src/transport/test_http_common.c
@@ -32,9 +32,9 @@ clean (struct SplittedHTTPAddress *addr)
{
if (NULL == addr)
return;
- GNUNET_free_non_null (addr->host);
- GNUNET_free_non_null (addr->path);
- GNUNET_free_non_null (addr->protocol);
+ GNUNET_free (addr->host);
+ GNUNET_free (addr->path);
+ GNUNET_free (addr->protocol);
GNUNET_free (addr);
}
diff --git a/src/transport/test_plugin_hostkey.ecc b/src/transport/test_plugin_hostkey.ecc
index 96c3e7e4e..18641b798 100644
--- a/src/transport/test_plugin_hostkey.ecc
+++ b/src/transport/test_plugin_hostkey.ecc
Binary files differ
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 058d7d8bf..deb943956 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -93,10 +93,9 @@ get_size (unsigned int iter)
/* FreeBSD/OSX etc. Unix DGRAMs do not work
* with large messages */
if (0 == strcmp ("unix", ccc->test_plugin))
- ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024);
+ return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024);
#endif
- ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000);
- return ret;
+ return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000);
}
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf
index c8a5bf0d4..19bff8fcc 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf
@@ -9,8 +9,8 @@ TIMEOUT = 5 s
[transport]
PLUGINS = tcp
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
-[transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG]
-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 =
+[transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730]
+F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 =
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf
index 30b82aebf..79bc90469 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf
@@ -3,11 +3,11 @@
GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/
[transport]
-PLUGINS = tcp udp
+PLUGINS = tcp unix
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
-[transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG]
-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp
+[transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730]
+F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf
index 12c11252e..b328dd5cf 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf
@@ -5,9 +5,9 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/
[transport]
PLUGINS = tcp
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
-[transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG]
-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp
+[transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730]
+F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf
index 4b449bed8..862209d2c 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf
@@ -5,9 +5,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
[transport]
PLUGINS = tcp
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
-
-[transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50]
-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG =
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
+[transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0]
+4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 =
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf
index 690eb3b76..3134f9d81 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf
@@ -3,10 +3,10 @@
GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
[transport]
-PLUGINS = tcp udp
+PLUGINS = tcp unix
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
-[transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50]
-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp
+[transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0]
+4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 = tcp
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf
index 00d3343e8..dd582125d 100644
--- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf
@@ -5,8 +5,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
[transport]
PLUGINS = tcp
-#Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG
-#Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50
+#Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730
+#Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0
-[transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50]
-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp
+[transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0]
+4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 = tcp
diff --git a/src/transport/transport-testing-main.c b/src/transport/transport-testing-main.c
index 8c35ff252..20c58eeee 100644
--- a/src/transport/transport-testing-main.c
+++ b/src/transport/transport-testing-main.c
@@ -604,7 +604,7 @@ GNUNET_TRANSPORT_TESTING_main_ (const char *argv0,
for (unsigned int i = 0; i < num_peers; i++)
GNUNET_free (cfg_names[i]);
GNUNET_free (test_source);
- GNUNET_free_non_null (test_plugin);
+ GNUNET_free (test_plugin);
GNUNET_free (test_name);
return ret;
}
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 06dbe891a..2da193b31 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -349,7 +349,7 @@ get_hello (void *cb_cls,
GNUNET_assert (0 == memcmp (&hello_id,
&p->id,
sizeof(hello_id)));
- GNUNET_free_non_null (p->hello);
+ GNUNET_free (p->hello);
p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message);
if (NULL != p->start_cb)
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
cfgname,
emsg);
GNUNET_TRANSPORT_TESTING_stop_peer (p);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
return NULL;
}
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer))
{
LOG (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c
index cbe1159f3..10b064241 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -970,6 +970,7 @@ shutdown_nat (void *cls)
shutdown_process (proc);
}
+
/**
* @brief Task run at shutdown to kill the resolver process
*
@@ -982,6 +983,7 @@ shutdown_resolver (void *cls)
shutdown_process (proc);
}
+
static void
resolver_start (struct
GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h)
@@ -990,16 +992,17 @@ resolver_start (struct
LOG (GNUNET_ERROR_TYPE_DEBUG, "resolver_start\n");
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
- tc_h->resolver_proc = GNUNET_OS_start_process (GNUNET_YES,
- GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL,
- NULL,
- NULL,
- binary,
- "gnunet-service-resolver",
- "-c",
- tc_h->cfg_filename,
- NULL);
+ tc_h->resolver_proc = GNUNET_OS_start_process (
+ GNUNET_OS_INHERIT_STD_OUT_AND_ERR
+ | GNUNET_OS_USE_PIPE_CONTROL,
+ NULL,
+ NULL,
+ NULL,
+ binary,
+ "gnunet-service-resolver",
+ "-c",
+ tc_h->cfg_filename,
+ NULL);
if (NULL == tc_h->resolver_proc)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start resolver service!");
@@ -1054,8 +1057,8 @@ nat_start (
LOG (GNUNET_ERROR_TYPE_DEBUG, "nat_start\n");
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-nat");
- tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_YES,
- GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR
+ | GNUNET_OS_USE_PIPE_CONTROL,
NULL,
NULL,
NULL,
@@ -1073,6 +1076,7 @@ nat_start (
GNUNET_free (binary);
}
+
/**
* @brief Start communicator part of transport service and communicator
*
diff --git a/src/transport/transport.h b/src/transport/transport.h
index a64ffd5c6..dbae4ecfb 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -903,7 +903,6 @@ struct GNUNET_TRANSPORT_UpdateQueueMessage
};
-
/**
* Remove queue, it is no longer available.
*/
diff --git a/src/transport/transport_api2_communication.c b/src/transport/transport_api2_communication.c
index cfa144415..d1e28cc36 100644
--- a/src/transport/transport_api2_communication.c
+++ b/src/transport/transport_api2_communication.c
@@ -420,6 +420,7 @@ send_add_queue (struct GNUNET_TRANSPORT_QueueHandle *qh)
GNUNET_MQ_send (qh->ch->mq, env);
}
+
/**
* Send message to the transport service about queue @a qh
* updated.
@@ -446,7 +447,6 @@ send_update_queue (struct GNUNET_TRANSPORT_QueueHandle *qh)
}
-
/**
* Send message to the transport service about queue @a qh
* being no longer available.
@@ -1033,7 +1033,6 @@ GNUNET_TRANSPORT_communicator_mq_update (
}
-
/**
* Notify transport service that an MQ became unavailable due to a
* disconnect or timeout.
diff --git a/src/transport/transport_api2_core.c b/src/transport/transport_api2_core.c
index cd8bacf3d..002af81fc 100644
--- a/src/transport/transport_api2_core.c
+++ b/src/transport/transport_api2_core.c
@@ -762,7 +762,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
reconnect (h);
if (NULL == h->mq)
{
- GNUNET_free_non_null (h->handlers);
+ GNUNET_free (h->handlers);
GNUNET_free (h);
return NULL;
}
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
}
GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
handle->neighbours = NULL;
- GNUNET_free_non_null (handle->handlers);
+ GNUNET_free (handle->handlers);
handle->handlers = NULL;
GNUNET_free (handle);
}
diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c
index 5d841fa10..7d4b415bd 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -622,13 +622,14 @@ handle_send_ok (void *cls, const struct SendOkMessage *okm)
struct Neighbour *n;
uint32_t bytes_msg;
uint32_t bytes_physical;
+ uint16_t success = ntohs (okm->success);
- bytes_msg = ntohl (okm->bytes_msg);
+ bytes_msg = ntohs (okm->bytes_msg);
bytes_physical = ntohl (okm->bytes_physical);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Receiving SEND_OK message, transmission to %s %s.\n",
GNUNET_i2s (&okm->peer),
- ntohl (okm->success) == GNUNET_OK ? "succeeded" : "failed");
+ success == GNUNET_OK ? "succeeded" : "failed");
n = neighbour_find (h, &okm->peer);
if (NULL == n)
{
@@ -891,7 +892,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
reconnect (h);
if (NULL == h->mq)
{
- GNUNET_free_non_null (h->handlers);
+ GNUNET_free (h->handlers);
GNUNET_free (h);
return NULL;
}
@@ -922,7 +923,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
}
GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
handle->neighbours = NULL;
- GNUNET_free_non_null (handle->handlers);
+ GNUNET_free (handle->handlers);
handle->handlers = NULL;
GNUNET_free (handle);
}