diff options
author | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:30:37 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:30:37 +0200 |
commit | 5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7 (patch) | |
tree | c26167460724fea683ef51a88ffd93d1fa830412 /src/transport | |
parent | 17d84245fdfeeb1a6da4ffb97898903cb55f702c (diff) | |
parent | 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (diff) | |
download | gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.tar.gz gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.zip |
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/transport')
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 = \ | |||
155 | $(top_builddir)/src/ats/libgnunetats.la \ | 155 | $(top_builddir)/src/ats/libgnunetats.la \ |
156 | $(top_builddir)/src/util/libgnunetutil.la \ | 156 | $(top_builddir)/src/util/libgnunetutil.la \ |
157 | $(top_builddir)/src/testing/libgnunettesting.la \ | 157 | $(top_builddir)/src/testing/libgnunettesting.la \ |
158 | $(top_builddir)/src/arm/libgnunetarm.la \ | ||
158 | $(GN_LIBINTL) | 159 | $(GN_LIBINTL) |
160 | libgnunettransporttesting_la_DEPENDENCIES = \ | ||
161 | libgnunettransport.la \ | ||
162 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
163 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
164 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
165 | $(top_builddir)/src/testing/libgnunettesting.la \ | ||
166 | $(top_builddir)/src/arm/libgnunetarm.la | ||
159 | libgnunettransporttesting_la_LDFLAGS = \ | 167 | libgnunettransporttesting_la_LDFLAGS = \ |
160 | $(GN_LIB_LDFLAGS) | 168 | $(GN_LIB_LDFLAGS) |
161 | 169 | ||
@@ -185,6 +193,10 @@ libgnunettransport_la_LIBADD = \ | |||
185 | $(top_builddir)/src/ats/libgnunetats.la \ | 193 | $(top_builddir)/src/ats/libgnunetats.la \ |
186 | $(top_builddir)/src/util/libgnunetutil.la \ | 194 | $(top_builddir)/src/util/libgnunetutil.la \ |
187 | $(GN_LIBINTL) | 195 | $(GN_LIBINTL) |
196 | libgnunettransport_la_DEPENDENCIES = \ | ||
197 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
198 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
199 | $(top_builddir)/src/util/libgnunetutil.la | ||
188 | libgnunettransport_la_LDFLAGS = \ | 200 | libgnunettransport_la_LDFLAGS = \ |
189 | $(GN_LIB_LDFLAGS) \ | 201 | $(GN_LIB_LDFLAGS) \ |
190 | -version-info 4:0:2 | 202 | -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 | |||
707 | }; | 707 | }; |
708 | 708 | ||
709 | 709 | ||
710 | |||
711 | /** | 710 | /** |
712 | * Maximum queue length before we stop reading towards the transport service. | 711 | * Maximum queue length before we stop reading towards the transport service. |
713 | */ | 712 | */ |
@@ -1618,6 +1617,7 @@ queue_read (void *cls) | |||
1618 | queue_finish (queue); | 1617 | queue_finish (queue); |
1619 | } | 1618 | } |
1620 | 1619 | ||
1620 | |||
1621 | /** | 1621 | /** |
1622 | * Convert a `struct sockaddr_in6 to a `struct sockaddr *` | 1622 | * Convert a `struct sockaddr_in6 to a `struct sockaddr *` |
1623 | * | 1623 | * |
@@ -1642,6 +1642,7 @@ tcp_address_to_sockaddr_numeric_v6 (socklen_t *sock_len, struct sockaddr_in6 v6, | |||
1642 | return in; | 1642 | return in; |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | |||
1645 | /** | 1646 | /** |
1646 | * Convert a `struct sockaddr_in4 to a `struct sockaddr *` | 1647 | * Convert a `struct sockaddr_in4 to a `struct sockaddr *` |
1647 | * | 1648 | * |
@@ -1665,6 +1666,7 @@ tcp_address_to_sockaddr_numeric_v4 (socklen_t *sock_len, struct sockaddr_in v4, | |||
1665 | return in; | 1666 | return in; |
1666 | } | 1667 | } |
1667 | 1668 | ||
1669 | |||
1668 | /** | 1670 | /** |
1669 | * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` | 1671 | * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` |
1670 | * | 1672 | * |
@@ -1724,6 +1726,7 @@ tcp_address_to_sockaddr_port_only (const char *bindto, unsigned int *port) | |||
1724 | return po; | 1726 | return po; |
1725 | } | 1727 | } |
1726 | 1728 | ||
1729 | |||
1727 | /** | 1730 | /** |
1728 | * This Method extracts the address part of the BINDTO string. | 1731 | * This Method extracts the address part of the BINDTO string. |
1729 | * | 1732 | * |
@@ -1750,7 +1753,8 @@ extract_address (const char *bindto) | |||
1750 | start++; /* skip over '['*/ | 1753 | start++; /* skip over '['*/ |
1751 | cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ | 1754 | cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ |
1752 | } | 1755 | } |
1753 | else { | 1756 | else |
1757 | { | ||
1754 | token = strtok_r (cp, "]", &rest); | 1758 | token = strtok_r (cp, "]", &rest); |
1755 | if (strlen (bindto) == strlen (token)) | 1759 | if (strlen (bindto) == strlen (token)) |
1756 | { | 1760 | { |
@@ -1768,6 +1772,7 @@ extract_address (const char *bindto) | |||
1768 | return start; | 1772 | return start; |
1769 | } | 1773 | } |
1770 | 1774 | ||
1775 | |||
1771 | /** | 1776 | /** |
1772 | * This Method extracts the port part of the BINDTO string. | 1777 | * This Method extracts the port part of the BINDTO string. |
1773 | * | 1778 | * |
@@ -1846,6 +1851,7 @@ extract_port (const char *addr_and_port) | |||
1846 | return port; | 1851 | return port; |
1847 | } | 1852 | } |
1848 | 1853 | ||
1854 | |||
1849 | /** | 1855 | /** |
1850 | * Convert TCP bind specification to a `struct sockaddr *` | 1856 | * Convert TCP bind specification to a `struct sockaddr *` |
1851 | * | 1857 | * |
@@ -2683,6 +2689,7 @@ queue_read_kx (void *cls) | |||
2683 | queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); | 2689 | queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); |
2684 | } | 2690 | } |
2685 | 2691 | ||
2692 | |||
2686 | /** | 2693 | /** |
2687 | * Function called by the transport service to initialize a | 2694 | * Function called by the transport service to initialize a |
2688 | * message queue given address information about another peer. | 2695 | * message queue given address information about another peer. |
@@ -2777,6 +2784,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) | |||
2777 | return GNUNET_OK; | 2784 | return GNUNET_OK; |
2778 | } | 2785 | } |
2779 | 2786 | ||
2787 | |||
2780 | /** | 2788 | /** |
2781 | * Iterator over all message queues to clean up. | 2789 | * Iterator over all message queues to clean up. |
2782 | * | 2790 | * |
@@ -2911,6 +2919,7 @@ nat_address_cb (void *cls, | |||
2911 | } | 2919 | } |
2912 | } | 2920 | } |
2913 | 2921 | ||
2922 | |||
2914 | /** | 2923 | /** |
2915 | * This method launch network interactions for each address we like to bind to. | 2924 | * This method launch network interactions for each address we like to bind to. |
2916 | * | 2925 | * |
@@ -3015,7 +3024,7 @@ init_socket (const struct sockaddr *addr, | |||
3015 | if (NULL == queue_map) | 3024 | if (NULL == queue_map) |
3016 | queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); | 3025 | queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
3017 | 3026 | ||
3018 | if (NULL == ch ) | 3027 | if (NULL == ch) |
3019 | ch = GNUNET_TRANSPORT_communicator_connect (cfg, | 3028 | ch = GNUNET_TRANSPORT_communicator_connect (cfg, |
3020 | COMMUNICATOR_CONFIG_SECTION, | 3029 | COMMUNICATOR_CONFIG_SECTION, |
3021 | COMMUNICATOR_ADDRESS_PREFIX, | 3030 | COMMUNICATOR_ADDRESS_PREFIX, |
@@ -3038,6 +3047,7 @@ init_socket (const struct sockaddr *addr, | |||
3038 | 3047 | ||
3039 | } | 3048 | } |
3040 | 3049 | ||
3050 | |||
3041 | /** | 3051 | /** |
3042 | * This method reads from the DLL addrs_head to register them at the NAT service. | 3052 | * This method reads from the DLL addrs_head to register them at the NAT service. |
3043 | */ | 3053 | */ |
@@ -3092,6 +3102,7 @@ nat_register () | |||
3092 | } | 3102 | } |
3093 | } | 3103 | } |
3094 | 3104 | ||
3105 | |||
3095 | /** | 3106 | /** |
3096 | * This method adds addresses to the DLL, that are later register at the NAT service. | 3107 | * This method adds addresses to the DLL, that are later register at the NAT service. |
3097 | */ | 3108 | */ |
@@ -3108,6 +3119,7 @@ add_addr (struct sockaddr *in, socklen_t in_len) | |||
3108 | addrs_lens++; | 3119 | addrs_lens++; |
3109 | } | 3120 | } |
3110 | 3121 | ||
3122 | |||
3111 | /** | 3123 | /** |
3112 | * This method is the callback called by the resolver API, and wraps method init_socket. | 3124 | * This method is the callback called by the resolver API, and wraps method init_socket. |
3113 | * | 3125 | * |
@@ -3160,6 +3172,7 @@ init_socket_resolv (void *cls, | |||
3160 | } | 3172 | } |
3161 | } | 3173 | } |
3162 | 3174 | ||
3175 | |||
3163 | /** | 3176 | /** |
3164 | * Setup communicator and launch network interactions. | 3177 | * Setup communicator and launch network interactions. |
3165 | * | 3178 | * |
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) | |||
783 | GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); | 783 | GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); |
784 | GNUNET_SCHEDULER_cancel (bi->broadcast_task); | 784 | GNUNET_SCHEDULER_cancel (bi->broadcast_task); |
785 | GNUNET_free (bi->sa); | 785 | GNUNET_free (bi->sa); |
786 | GNUNET_free_non_null (bi->ba); | 786 | GNUNET_free (bi->ba); |
787 | GNUNET_free (bi); | 787 | GNUNET_free (bi); |
788 | } | 788 | } |
789 | 789 | ||
@@ -1309,7 +1309,8 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
1309 | "Tell transport we have more acks!\n"); | 1309 | "Tell transport we have more acks!\n"); |
1310 | GNUNET_TRANSPORT_communicator_mq_update (ch, | 1310 | GNUNET_TRANSPORT_communicator_mq_update (ch, |
1311 | receiver->d_qh, | 1311 | receiver->d_qh, |
1312 | (allowed - ss->sequence_allowed), | 1312 | (allowed |
1313 | - ss->sequence_allowed), | ||
1313 | 1); | 1314 | 1); |
1314 | ss->sequence_allowed = allowed; | 1315 | ss->sequence_allowed = allowed; |
1315 | /* move ss to head to avoid discarding it anytime soon! */ | 1316 | /* 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, | |||
673 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, | 673 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, |
674 | &queue->target, | 674 | &queue->target, |
675 | foreign_addr, | 675 | foreign_addr, |
676 | UNIX_MTU - sizeof (struct UNIXMessage), | 676 | UNIX_MTU - sizeof (struct |
677 | UNIXMessage), | ||
677 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, | 678 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, |
678 | 0, | 679 | 0, |
679 | GNUNET_NT_LOOPBACK, | 680 | GNUNET_NT_LOOPBACK, |
@@ -799,7 +800,7 @@ select_read_cb (void *cls) | |||
799 | /* ensure aligned access */ | 800 | /* ensure aligned access */ |
800 | memcpy (&al_hdr, currhdr, sizeof(al_hdr)); | 801 | memcpy (&al_hdr, currhdr, sizeof(al_hdr)); |
801 | if ((tsize < sizeof(struct GNUNET_MessageHeader)) || | 802 | if ((tsize < sizeof(struct GNUNET_MessageHeader)) || |
802 | (tsize != ntohs(al_hdr.size))) | 803 | (tsize != ntohs (al_hdr.size))) |
803 | { | 804 | { |
804 | GNUNET_break_op (0); | 805 | GNUNET_break_op (0); |
805 | return; | 806 | 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, | |||
727 | stcc->uuid); | 727 | stcc->uuid); |
728 | send_ok_msg.header.size = htons (sizeof(send_ok_msg)); | 728 | send_ok_msg.header.size = htons (sizeof(send_ok_msg)); |
729 | send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); | 729 | send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); |
730 | send_ok_msg.bytes_msg = htonl (bytes_payload); | 730 | send_ok_msg.bytes_msg = htons (bytes_payload); |
731 | send_ok_msg.bytes_physical = htonl (bytes_on_wire); | 731 | send_ok_msg.bytes_physical = htonl (bytes_on_wire); |
732 | send_ok_msg.success = htonl (success); | 732 | send_ok_msg.success = htons (success); |
733 | send_ok_msg.peer = stcc->target; | 733 | send_ok_msg.peer = stcc->target; |
734 | unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO); | 734 | unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO); |
735 | } | 735 | } |
@@ -2108,7 +2108,7 @@ free_blacklist_entry (void *cls, | |||
2108 | { | 2108 | { |
2109 | char *be = value; | 2109 | char *be = value; |
2110 | 2110 | ||
2111 | GNUNET_free_non_null (be); | 2111 | GNUNET_free (be); |
2112 | return GNUNET_OK; | 2112 | return GNUNET_OK; |
2113 | } | 2113 | } |
2114 | 2114 | ||
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc) | |||
2511 | GNUNET_SCHEDULER_cancel (bc->task); | 2511 | GNUNET_SCHEDULER_cancel (bc->task); |
2512 | bc->task = NULL; | 2512 | bc->task = NULL; |
2513 | } | 2513 | } |
2514 | GNUNET_free_non_null (bc->address); | 2514 | GNUNET_free (bc->address); |
2515 | GNUNET_free (bc); | 2515 | GNUNET_free (bc); |
2516 | } | 2516 | } |
2517 | 2517 | ||
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) | |||
182 | gc.addr_pos = oal_head; | 182 | gc.addr_pos = oal_head; |
183 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); | 183 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); |
184 | 184 | ||
185 | GNUNET_free_non_null (our_hello); | 185 | GNUNET_free (our_hello); |
186 | our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, | 186 | our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, |
187 | &address_generator, | 187 | &address_generator, |
188 | &gc, | 188 | &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) | |||
339 | GNUNET_assert ( | 339 | GNUNET_assert ( |
340 | GNUNET_OK == | 340 | GNUNET_OK == |
341 | GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); | 341 | GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); |
342 | GNUNET_free_non_null (m->address); | 342 | GNUNET_free (m->address); |
343 | GNUNET_free (value); | 343 | GNUNET_free (value); |
344 | return GNUNET_OK; | 344 | return GNUNET_OK; |
345 | } | 345 | } |
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls, | |||
1037 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); | 1037 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); |
1038 | addr->asc = NULL; | 1038 | addr->asc = NULL; |
1039 | } | 1039 | } |
1040 | GNUNET_free_non_null (addr->str); | 1040 | GNUNET_free (addr->str); |
1041 | GNUNET_free (addr); | 1041 | GNUNET_free (addr); |
1042 | *session_ctx = NULL; | 1042 | *session_ctx = NULL; |
1043 | } | 1043 | } |
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls, | |||
1069 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); | 1069 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); |
1070 | addr->asc = NULL; | 1070 | addr->asc = NULL; |
1071 | } | 1071 | } |
1072 | GNUNET_free_non_null (addr->str); | 1072 | GNUNET_free (addr->str); |
1073 | GNUNET_free (addr); | 1073 | GNUNET_free (addr); |
1074 | *session_ctx = NULL; | 1074 | *session_ctx = NULL; |
1075 | } | 1075 | } |
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) | |||
2207 | _ ("Shutdown for plugin `%s' complete\n"), | 2207 | _ ("Shutdown for plugin `%s' complete\n"), |
2208 | plugin->name); | 2208 | plugin->name); |
2209 | GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); | 2209 | GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); |
2210 | GNUNET_free_non_null (plugin->proxy_hostname); | 2210 | GNUNET_free (plugin->proxy_hostname); |
2211 | GNUNET_free_non_null (plugin->proxy_username); | 2211 | GNUNET_free (plugin->proxy_username); |
2212 | GNUNET_free_non_null (plugin->proxy_password); | 2212 | GNUNET_free (plugin->proxy_password); |
2213 | GNUNET_free (plugin); | 2213 | GNUNET_free (plugin); |
2214 | GNUNET_free (api); | 2214 | GNUNET_free (api); |
2215 | return NULL; | 2215 | return NULL; |
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin) | |||
2304 | GNUNET_free (proxy_type); | 2304 | GNUNET_free (proxy_type); |
2305 | GNUNET_free (plugin->proxy_hostname); | 2305 | GNUNET_free (plugin->proxy_hostname); |
2306 | plugin->proxy_hostname = NULL; | 2306 | plugin->proxy_hostname = NULL; |
2307 | GNUNET_free_non_null (plugin->proxy_username); | 2307 | GNUNET_free (plugin->proxy_username); |
2308 | plugin->proxy_username = NULL; | 2308 | plugin->proxy_username = NULL; |
2309 | GNUNET_free_non_null (plugin->proxy_password); | 2309 | GNUNET_free (plugin->proxy_password); |
2310 | plugin->proxy_password = NULL; | 2310 | plugin->proxy_password = NULL; |
2311 | 2311 | ||
2312 | return GNUNET_SYSERR; | 2312 | return GNUNET_SYSERR; |
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin) | |||
2325 | if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) | 2325 | if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) |
2326 | plugin->proxy_use_httpproxytunnel = GNUNET_NO; | 2326 | plugin->proxy_use_httpproxytunnel = GNUNET_NO; |
2327 | 2327 | ||
2328 | GNUNET_free_non_null (proxy_type); | 2328 | GNUNET_free (proxy_type); |
2329 | } | 2329 | } |
2330 | 2330 | ||
2331 | /* Should we emulate an XHR client for testing? */ | 2331 | /* 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) | |||
34 | { | 34 | { |
35 | if (NULL != spa) | 35 | if (NULL != spa) |
36 | { | 36 | { |
37 | GNUNET_free_non_null (spa->protocol); | 37 | GNUNET_free (spa->protocol); |
38 | GNUNET_free_non_null (spa->host); | 38 | GNUNET_free (spa->host); |
39 | GNUNET_free_non_null (spa->path); | 39 | GNUNET_free (spa->path); |
40 | GNUNET_free_non_null (spa); | 40 | GNUNET_free (spa); |
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
494 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); | 494 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); |
495 | asc (asc_cls, NULL, GNUNET_OK); | 495 | asc (asc_cls, NULL, GNUNET_OK); |
496 | http_clean_splitted (saddr); | 496 | http_clean_splitted (saddr); |
497 | GNUNET_free_non_null (sock_addr); | 497 | GNUNET_free (sock_addr); |
498 | return; | 498 | return; |
499 | } | 499 | } |
500 | if ((GNUNET_YES == numeric) && | 500 | if ((GNUNET_YES == numeric) && |
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
510 | goto handle_error; | 510 | goto handle_error; |
511 | } | 511 | } |
512 | /* Wait for resolver callback */ | 512 | /* Wait for resolver callback */ |
513 | GNUNET_free_non_null (sock_addr); | 513 | GNUNET_free (sock_addr); |
514 | return; | 514 | return; |
515 | } | 515 | } |
516 | if ((GNUNET_NO == numeric) && | 516 | if ((GNUNET_NO == numeric) && |
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
531 | goto handle_error; | 531 | goto handle_error; |
532 | } | 532 | } |
533 | /* Wait for resolver callback */ | 533 | /* Wait for resolver callback */ |
534 | GNUNET_free_non_null (sock_addr); | 534 | GNUNET_free (sock_addr); |
535 | return; | 535 | return; |
536 | } | 536 | } |
537 | if ((GNUNET_NO == numeric) && | 537 | if ((GNUNET_NO == numeric) && |
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
541 | ret = http_common_plugin_address_to_string (type, address, addrlen); | 541 | ret = http_common_plugin_address_to_string (type, address, addrlen); |
542 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); | 542 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); |
543 | asc (asc_cls, NULL, GNUNET_OK); | 543 | asc (asc_cls, NULL, GNUNET_OK); |
544 | GNUNET_free_non_null (sock_addr); | 544 | GNUNET_free (sock_addr); |
545 | http_clean_splitted (saddr); | 545 | http_clean_splitted (saddr); |
546 | return; | 546 | return; |
547 | } | 547 | } |
@@ -553,7 +553,7 @@ handle_error: | |||
553 | /* Report error */ | 553 | /* Report error */ |
554 | asc (asc_cls, NULL, GNUNET_SYSERR); | 554 | asc (asc_cls, NULL, GNUNET_SYSERR); |
555 | asc (asc_cls, NULL, GNUNET_OK); | 555 | asc (asc_cls, NULL, GNUNET_OK); |
556 | GNUNET_free_non_null (sock_addr); | 556 | GNUNET_free (sock_addr); |
557 | if (NULL != saddr) | 557 | if (NULL != saddr) |
558 | http_clean_splitted (saddr); | 558 | http_clean_splitted (saddr); |
559 | } | 559 | } |
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, | |||
1495 | http_common_plugin_address_to_string (plugin->protocol, | 1495 | http_common_plugin_address_to_string (plugin->protocol, |
1496 | addr, | 1496 | addr, |
1497 | addr_len)); | 1497 | addr_len)); |
1498 | GNUNET_free_non_null (addr); | 1498 | GNUNET_free (addr); |
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | if ((_RECEIVE == direction) && | 1501 | if ((_RECEIVE == direction) && |
@@ -2179,16 +2179,16 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2179 | { | 2179 | { |
2180 | struct GNUNET_OS_Process *cert_creation; | 2180 | struct GNUNET_OS_Process *cert_creation; |
2181 | 2181 | ||
2182 | GNUNET_free_non_null (plugin->key); | 2182 | GNUNET_free (plugin->key); |
2183 | plugin->key = NULL; | 2183 | plugin->key = NULL; |
2184 | GNUNET_free_non_null (plugin->cert); | 2184 | GNUNET_free (plugin->cert); |
2185 | plugin->cert = NULL; | 2185 | plugin->cert = NULL; |
2186 | 2186 | ||
2187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2188 | "No usable TLS certificate found, creating certificate\n"); | 2188 | "No usable TLS certificate found, creating certificate\n"); |
2189 | errno = 0; | 2189 | errno = 0; |
2190 | cert_creation = | 2190 | cert_creation = |
2191 | GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 2191 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
2192 | NULL, NULL, NULL, | 2192 | NULL, NULL, NULL, |
2193 | "gnunet-transport-certificate-creation", | 2193 | "gnunet-transport-certificate-creation", |
2194 | "gnunet-transport-certificate-creation", | 2194 | "gnunet-transport-certificate-creation", |
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2203 | GNUNET_free (key_file); | 2203 | GNUNET_free (key_file); |
2204 | GNUNET_free (cert_file); | 2204 | GNUNET_free (cert_file); |
2205 | 2205 | ||
2206 | GNUNET_free_non_null (plugin->key); | 2206 | GNUNET_free (plugin->key); |
2207 | plugin->key = NULL; | 2207 | plugin->key = NULL; |
2208 | GNUNET_free_non_null (plugin->cert); | 2208 | GNUNET_free (plugin->cert); |
2209 | plugin->cert = NULL; | 2209 | plugin->cert = NULL; |
2210 | GNUNET_free_non_null (plugin->crypto_init); | 2210 | GNUNET_free (plugin->crypto_init); |
2211 | plugin->crypto_init = NULL; | 2211 | plugin->crypto_init = NULL; |
2212 | 2212 | ||
2213 | return GNUNET_SYSERR; | 2213 | return GNUNET_SYSERR; |
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2228 | GNUNET_free (key_file); | 2228 | GNUNET_free (key_file); |
2229 | GNUNET_free (cert_file); | 2229 | GNUNET_free (cert_file); |
2230 | 2230 | ||
2231 | GNUNET_free_non_null (plugin->key); | 2231 | GNUNET_free (plugin->key); |
2232 | plugin->key = NULL; | 2232 | plugin->key = NULL; |
2233 | GNUNET_free_non_null (plugin->cert); | 2233 | GNUNET_free (plugin->cert); |
2234 | plugin->cert = NULL; | 2234 | plugin->cert = NULL; |
2235 | GNUNET_free_non_null (plugin->crypto_init); | 2235 | GNUNET_free (plugin->crypto_init); |
2236 | plugin->crypto_init = NULL; | 2236 | plugin->crypto_init = NULL; |
2237 | 2237 | ||
2238 | return GNUNET_SYSERR; | 2238 | return GNUNET_SYSERR; |
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin) | |||
2871 | GNUNET_assert (NULL != addrs[res]); | 2871 | GNUNET_assert (NULL != addrs[res]); |
2872 | GNUNET_free (addrs[res]); | 2872 | GNUNET_free (addrs[res]); |
2873 | } | 2873 | } |
2874 | GNUNET_free_non_null (addrs); | 2874 | GNUNET_free (addrs); |
2875 | GNUNET_free_non_null (addrlens); | 2875 | GNUNET_free (addrlens); |
2876 | } | 2876 | } |
2877 | 2877 | ||
2878 | 2878 | ||
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3316 | plugin->server_v6_task = NULL; | 3316 | plugin->server_v6_task = NULL; |
3317 | } | 3317 | } |
3318 | #if BUILD_HTTPS | 3318 | #if BUILD_HTTPS |
3319 | GNUNET_free_non_null (plugin->crypto_init); | 3319 | GNUNET_free (plugin->crypto_init); |
3320 | GNUNET_free_non_null (plugin->cert); | 3320 | GNUNET_free (plugin->cert); |
3321 | GNUNET_free_non_null (plugin->key); | 3321 | GNUNET_free (plugin->key); |
3322 | #endif | 3322 | #endif |
3323 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, | 3323 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, |
3324 | &destroy_session_shutdown_cb, | 3324 | &destroy_session_shutdown_cb, |
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3336 | plugin->server_v6 = NULL; | 3336 | plugin->server_v6 = NULL; |
3337 | } | 3337 | } |
3338 | /* Clean up */ | 3338 | /* Clean up */ |
3339 | GNUNET_free_non_null (plugin->external_hostname); | 3339 | GNUNET_free (plugin->external_hostname); |
3340 | GNUNET_free_non_null (plugin->ext_addr); | 3340 | GNUNET_free (plugin->ext_addr); |
3341 | GNUNET_free_non_null (plugin->server_addr_v4); | 3341 | GNUNET_free (plugin->server_addr_v4); |
3342 | GNUNET_free_non_null (plugin->server_addr_v6); | 3342 | GNUNET_free (plugin->server_addr_v6); |
3343 | regfree (&plugin->url_regex); | 3343 | regfree (&plugin->url_regex); |
3344 | 3344 | ||
3345 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 3345 | 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) | |||
174 | goto END; \ | 174 | goto END; \ |
175 | } \ | 175 | } \ |
176 | if (core_api->load_monitor != NULL) \ | 176 | if (core_api->load_monitor != NULL) \ |
177 | GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \ | 177 | GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \ |
178 | GNUNET_ND_DOWNLOAD, \ | 178 | GNUNET_ND_DOWNLOAD, \ |
179 | strlen (retl)); \ | 179 | strlen (retl)); \ |
180 | } while (0) | 180 | } while (0) |
181 | 181 | ||
182 | 182 | ||
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, | |||
1186 | (EACCES == errno)) | 1186 | (EACCES == errno)) |
1187 | { | 1187 | { |
1188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); | 1188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); |
1189 | GNUNET_free_non_null (hostname); | 1189 | GNUNET_free (hostname); |
1190 | GNUNET_free (unixpath); | 1190 | GNUNET_free (unixpath); |
1191 | return GNUNET_SYSERR; | 1191 | return GNUNET_SYSERR; |
1192 | } | 1192 | } |
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name, | |||
1212 | _ ( | 1212 | _ ( |
1213 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 1213 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
1214 | service_name); | 1214 | service_name); |
1215 | GNUNET_free_non_null (hostname); | 1215 | GNUNET_free (hostname); |
1216 | return GNUNET_SYSERR; | 1216 | return GNUNET_SYSERR; |
1217 | } | 1217 | } |
1218 | if (0 == port) | 1218 | if (0 == port) |
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name, | |||
1220 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); | 1220 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); |
1221 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); | 1221 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); |
1222 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 1222 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
1223 | GNUNET_free_non_null (unixpath); | 1223 | GNUNET_free (unixpath); |
1224 | GNUNET_free_non_null (hostname); | 1224 | GNUNET_free (hostname); |
1225 | *addrs = saddrs; | 1225 | *addrs = saddrs; |
1226 | *addr_lens = saddrlens; | 1226 | *addr_lens = saddrlens; |
1227 | return 1; | 1227 | return 1; |
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name, | |||
1245 | hostname, | 1245 | hostname, |
1246 | gai_strerror (ret)); | 1246 | gai_strerror (ret)); |
1247 | GNUNET_free (hostname); | 1247 | GNUNET_free (hostname); |
1248 | GNUNET_free_non_null (unixpath); | 1248 | GNUNET_free (unixpath); |
1249 | return GNUNET_SYSERR; | 1249 | return GNUNET_SYSERR; |
1250 | } | 1250 | } |
1251 | next = res; | 1251 | next = res; |
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name, | |||
1265 | hostname); | 1265 | hostname); |
1266 | freeaddrinfo (res); | 1266 | freeaddrinfo (res); |
1267 | GNUNET_free (hostname); | 1267 | GNUNET_free (hostname); |
1268 | GNUNET_free_non_null (unixpath); | 1268 | GNUNET_free (unixpath); |
1269 | return GNUNET_SYSERR; | 1269 | return GNUNET_SYSERR; |
1270 | } | 1270 | } |
1271 | resi = i; | 1271 | resi = i; |
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name, | |||
1372 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 1372 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
1373 | } | 1373 | } |
1374 | } | 1374 | } |
1375 | GNUNET_free_non_null (unixpath); | 1375 | GNUNET_free (unixpath); |
1376 | *addrs = saddrs; | 1376 | *addrs = saddrs; |
1377 | *addr_lens = saddrlens; | 1377 | *addr_lens = saddrlens; |
1378 | return resi; | 1378 | return resi; |
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls, | |||
3163 | else | 3163 | else |
3164 | { | 3164 | { |
3165 | GNUNET_break (0); | 3165 | GNUNET_break (0); |
3166 | GNUNET_free_non_null (vaddr); | 3166 | GNUNET_free (vaddr); |
3167 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3167 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3168 | return; | 3168 | return; |
3169 | } | 3169 | } |
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls, | |||
3267 | GNUNET_a2s (vaddr, alen)); | 3267 | GNUNET_a2s (vaddr, alen)); |
3268 | GNUNET_break_op (0); | 3268 | GNUNET_break_op (0); |
3269 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3269 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3270 | GNUNET_free_non_null (vaddr); | 3270 | GNUNET_free (vaddr); |
3271 | return; | 3271 | return; |
3272 | } | 3272 | } |
3273 | if (GNUNET_YES == session->expecting_welcome) | 3273 | if (GNUNET_YES == session->expecting_welcome) |
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls, | |||
3284 | GNUNET_a2s (vaddr, alen)); | 3284 | GNUNET_a2s (vaddr, alen)); |
3285 | GNUNET_break_op (0); | 3285 | GNUNET_break_op (0); |
3286 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3286 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3287 | GNUNET_free_non_null (vaddr); | 3287 | GNUNET_free (vaddr); |
3288 | return; | 3288 | return; |
3289 | } | 3289 | } |
3290 | 3290 | ||
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls, | |||
3300 | (unsigned int) ntohs (message->type), | 3300 | (unsigned int) ntohs (message->type), |
3301 | GNUNET_i2s (&session->target), | 3301 | GNUNET_i2s (&session->target), |
3302 | GNUNET_a2s (vaddr, alen)); | 3302 | GNUNET_a2s (vaddr, alen)); |
3303 | GNUNET_free_non_null (vaddr); | 3303 | GNUNET_free (vaddr); |
3304 | } | 3304 | } |
3305 | 3305 | ||
3306 | GNUNET_STATISTICS_update (plugin->env->stats, | 3306 | GNUNET_STATISTICS_update (plugin->env->stats, |
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
3802 | plugin); | 3802 | plugin); |
3803 | for (ret = ret_s - 1; ret >= 0; ret--) | 3803 | for (ret = ret_s - 1; ret >= 0; ret--) |
3804 | GNUNET_free (addrs[ret]); | 3804 | GNUNET_free (addrs[ret]); |
3805 | GNUNET_free_non_null (addrs); | 3805 | GNUNET_free (addrs); |
3806 | GNUNET_free_non_null (addrlens); | 3806 | GNUNET_free (addrlens); |
3807 | } | 3807 | } |
3808 | else | 3808 | else |
3809 | { | 3809 | { |
@@ -3893,7 +3893,7 @@ die: | |||
3893 | if (NULL != service) | 3893 | if (NULL != service) |
3894 | LEGACY_SERVICE_stop (service); | 3894 | LEGACY_SERVICE_stop (service); |
3895 | GNUNET_free (plugin); | 3895 | GNUNET_free (plugin); |
3896 | GNUNET_free_non_null (api); | 3896 | GNUNET_free (api); |
3897 | return NULL; | 3897 | return NULL; |
3898 | } | 3898 | } |
3899 | 3899 | ||
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) | |||
3669 | } | 3669 | } |
3670 | have_bind4 = GNUNET_YES; | 3670 | have_bind4 = GNUNET_YES; |
3671 | } | 3671 | } |
3672 | GNUNET_free_non_null (bind4_address); | 3672 | GNUNET_free (bind4_address); |
3673 | have_bind6 = GNUNET_NO; | 3673 | have_bind6 = GNUNET_NO; |
3674 | memset (&server_addrv6, 0, sizeof(server_addrv6)); | 3674 | memset (&server_addrv6, 0, sizeof(server_addrv6)); |
3675 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, | 3675 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, |
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
3691 | } | 3691 | } |
3692 | have_bind6 = GNUNET_YES; | 3692 | have_bind6 = GNUNET_YES; |
3693 | } | 3693 | } |
3694 | GNUNET_free_non_null (bind6_address); | 3694 | GNUNET_free (bind6_address); |
3695 | 3695 | ||
3696 | enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 3696 | enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
3697 | "transport-udp", | 3697 | "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) | |||
2093 | GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); | 2093 | GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); |
2094 | plugin->helper_payload_tokenizer = NULL; | 2094 | plugin->helper_payload_tokenizer = NULL; |
2095 | } | 2095 | } |
2096 | GNUNET_free_non_null (plugin->wlan_interface); | 2096 | GNUNET_free (plugin->wlan_interface); |
2097 | GNUNET_free (plugin); | 2097 | GNUNET_free (plugin); |
2098 | GNUNET_free (api); | 2098 | GNUNET_free (api); |
2099 | return NULL; | 2099 | 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) | |||
1088 | * leak the socket in this special case) ... */ | 1088 | * leak the socket in this special case) ... */ |
1089 | } | 1089 | } |
1090 | } | 1090 | } |
1091 | GNUNET_free_non_null (connection->addr); | 1091 | GNUNET_free (connection->addr); |
1092 | GNUNET_free_non_null (connection->hostname); | 1092 | GNUNET_free (connection->hostname); |
1093 | GNUNET_free (connection->write_buffer); | 1093 | GNUNET_free (connection->write_buffer); |
1094 | GNUNET_free (connection); | 1094 | GNUNET_free (connection); |
1095 | } | 1095 | } |
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 ( | |||
657 | (EACCES == errno)) | 657 | (EACCES == errno)) |
658 | { | 658 | { |
659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
660 | GNUNET_free_non_null (hostname); | 660 | GNUNET_free (hostname); |
661 | GNUNET_free (unixpath); | 661 | GNUNET_free (unixpath); |
662 | return GNUNET_SYSERR; | 662 | return GNUNET_SYSERR; |
663 | } | 663 | } |
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
683 | _ ( | 683 | _ ( |
684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
685 | service_name); | 685 | service_name); |
686 | GNUNET_free_non_null (hostname); | 686 | GNUNET_free (hostname); |
687 | return GNUNET_SYSERR; | 687 | return GNUNET_SYSERR; |
688 | } | 688 | } |
689 | if (0 == port) | 689 | if (0 == port) |
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses ( | |||
691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); | 691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); |
692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); | 692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); |
693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
694 | GNUNET_free_non_null (unixpath); | 694 | GNUNET_free (unixpath); |
695 | GNUNET_free_non_null (hostname); | 695 | GNUNET_free (hostname); |
696 | *addrs = saddrs; | 696 | *addrs = saddrs; |
697 | *addr_lens = saddrlens; | 697 | *addr_lens = saddrlens; |
698 | return 1; | 698 | return 1; |
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
716 | hostname, | 716 | hostname, |
717 | gai_strerror (ret)); | 717 | gai_strerror (ret)); |
718 | GNUNET_free (hostname); | 718 | GNUNET_free (hostname); |
719 | GNUNET_free_non_null (unixpath); | 719 | GNUNET_free (unixpath); |
720 | return GNUNET_SYSERR; | 720 | return GNUNET_SYSERR; |
721 | } | 721 | } |
722 | next = res; | 722 | next = res; |
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
736 | hostname); | 736 | hostname); |
737 | freeaddrinfo (res); | 737 | freeaddrinfo (res); |
738 | GNUNET_free (hostname); | 738 | GNUNET_free (hostname); |
739 | GNUNET_free_non_null (unixpath); | 739 | GNUNET_free (unixpath); |
740 | return GNUNET_SYSERR; | 740 | return GNUNET_SYSERR; |
741 | } | 741 | } |
742 | resi = i; | 742 | resi = i; |
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
844 | } | 844 | } |
845 | } | 845 | } |
846 | GNUNET_free_non_null (unixpath); | 846 | GNUNET_free (unixpath); |
847 | *addrs = saddrs; | 847 | *addrs = saddrs; |
848 | *addr_lens = saddrlens; | 848 | *addr_lens = saddrlens; |
849 | return resi; | 849 | return resi; |
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1024 | { | 1024 | { |
1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); | 1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); |
1026 | GNUNET_free (rdir); | 1026 | GNUNET_free (rdir); |
1027 | GNUNET_free_non_null (user); | 1027 | GNUNET_free (user); |
1028 | GNUNET_free (pif); | 1028 | GNUNET_free (pif); |
1029 | return GNUNET_SYSERR; | 1029 | return GNUNET_SYSERR; |
1030 | } | 1030 | } |
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1034 | { | 1034 | { |
1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); | 1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); |
1036 | GNUNET_free (pif); | 1036 | GNUNET_free (pif); |
1037 | GNUNET_free_non_null (user); | 1037 | GNUNET_free (user); |
1038 | return GNUNET_SYSERR; | 1038 | return GNUNET_SYSERR; |
1039 | } | 1039 | } |
1040 | if (0 > fprintf (pidfd, "%u", pid)) | 1040 | if (0 > fprintf (pidfd, "%u", pid)) |
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1042 | GNUNET_break (0 == fclose (pidfd)); | 1042 | GNUNET_break (0 == fclose (pidfd)); |
1043 | if ((NULL != user) && (0 < strlen (user))) | 1043 | if ((NULL != user) && (0 < strlen (user))) |
1044 | GNUNET_DISK_file_change_owner (pif, user); | 1044 | GNUNET_DISK_file_change_owner (pif, user); |
1045 | GNUNET_free_non_null (user); | 1045 | GNUNET_free (user); |
1046 | GNUNET_free (pif); | 1046 | GNUNET_free (pif); |
1047 | return GNUNET_OK; | 1047 | return GNUNET_OK; |
1048 | } | 1048 | } |
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc, | |||
1441 | /* shutdown */ | 1441 | /* shutdown */ |
1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) | 1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) |
1443 | pid_file_delete (&sctx); | 1443 | pid_file_delete (&sctx); |
1444 | GNUNET_free_non_null (sctx.my_handlers); | 1444 | GNUNET_free (sctx.my_handlers); |
1445 | 1445 | ||
1446 | shutdown: | 1446 | shutdown: |
1447 | if (-1 != sctx.ready_confirm_fd) | 1447 | if (-1 != sctx.ready_confirm_fd) |
@@ -1475,16 +1475,16 @@ shutdown: | |||
1475 | if (NULL != sctx.addrs) | 1475 | if (NULL != sctx.addrs) |
1476 | while (NULL != sctx.addrs[i]) | 1476 | while (NULL != sctx.addrs[i]) |
1477 | GNUNET_free_nz (sctx.addrs[i++]); | 1477 | GNUNET_free_nz (sctx.addrs[i++]); |
1478 | GNUNET_free_non_null (sctx.addrs); | 1478 | GNUNET_free (sctx.addrs); |
1479 | GNUNET_free_non_null (sctx.addrlens); | 1479 | GNUNET_free (sctx.addrlens); |
1480 | GNUNET_free_non_null (logfile); | 1480 | GNUNET_free (logfile); |
1481 | GNUNET_free_non_null (loglev); | 1481 | GNUNET_free (loglev); |
1482 | GNUNET_free (cfg_fn); | 1482 | GNUNET_free (cfg_fn); |
1483 | GNUNET_free_non_null (opt_cfg_fn); | 1483 | GNUNET_free (opt_cfg_fn); |
1484 | GNUNET_free_non_null (sctx.v4_denied); | 1484 | GNUNET_free (sctx.v4_denied); |
1485 | GNUNET_free_non_null (sctx.v6_denied); | 1485 | GNUNET_free (sctx.v6_denied); |
1486 | GNUNET_free_non_null (sctx.v4_allowed); | 1486 | GNUNET_free (sctx.v4_allowed); |
1487 | GNUNET_free_non_null (sctx.v6_allowed); | 1487 | GNUNET_free (sctx.v6_allowed); |
1488 | 1488 | ||
1489 | return err ? GNUNET_SYSERR : sctx.ret; | 1489 | return err ? GNUNET_SYSERR : sctx.ret; |
1490 | } | 1490 | } |
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1626 | } | 1626 | } |
1627 | if (NULL != sctx->server) | 1627 | if (NULL != sctx->server) |
1628 | GNUNET_SERVER_destroy (sctx->server); | 1628 | GNUNET_SERVER_destroy (sctx->server); |
1629 | GNUNET_free_non_null (sctx->my_handlers); | 1629 | GNUNET_free (sctx->my_handlers); |
1630 | if (NULL != sctx->addrs) | 1630 | if (NULL != sctx->addrs) |
1631 | { | 1631 | { |
1632 | i = 0; | 1632 | i = 0; |
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1634 | GNUNET_free_nz (sctx->addrs[i++]); | 1634 | GNUNET_free_nz (sctx->addrs[i++]); |
1635 | GNUNET_free (sctx->addrs); | 1635 | GNUNET_free (sctx->addrs); |
1636 | } | 1636 | } |
1637 | GNUNET_free_non_null (sctx->addrlens); | 1637 | GNUNET_free (sctx->addrlens); |
1638 | GNUNET_free_non_null (sctx->v4_denied); | 1638 | GNUNET_free (sctx->v4_denied); |
1639 | GNUNET_free_non_null (sctx->v6_denied); | 1639 | GNUNET_free (sctx->v6_denied); |
1640 | GNUNET_free_non_null (sctx->v4_allowed); | 1640 | GNUNET_free (sctx->v4_allowed); |
1641 | GNUNET_free_non_null (sctx->v6_allowed); | 1641 | GNUNET_free (sctx->v6_allowed); |
1642 | GNUNET_free (sctx); | 1642 | GNUNET_free (sctx); |
1643 | } | 1643 | } |
1644 | 1644 | ||
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) | |||
32 | { | 32 | { |
33 | if (NULL == addr) | 33 | if (NULL == addr) |
34 | return; | 34 | return; |
35 | GNUNET_free_non_null (addr->host); | 35 | GNUNET_free (addr->host); |
36 | GNUNET_free_non_null (addr->path); | 36 | GNUNET_free (addr->path); |
37 | GNUNET_free_non_null (addr->protocol); | 37 | GNUNET_free (addr->protocol); |
38 | GNUNET_free (addr); | 38 | GNUNET_free (addr); |
39 | } | 39 | } |
40 | 40 | ||
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) | |||
93 | /* FreeBSD/OSX etc. Unix DGRAMs do not work | 93 | /* FreeBSD/OSX etc. Unix DGRAMs do not work |
94 | * with large messages */ | 94 | * with large messages */ |
95 | if (0 == strcmp ("unix", ccc->test_plugin)) | 95 | if (0 == strcmp ("unix", ccc->test_plugin)) |
96 | ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024); | 96 | return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024); |
97 | #endif | 97 | #endif |
98 | ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000); | 98 | return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000); |
99 | return ret; | ||
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||
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 | |||
9 | [transport] | 9 | [transport] |
10 | PLUGINS = tcp | 10 | PLUGINS = tcp |
11 | 11 | ||
12 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 12 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
13 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 13 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
14 | 14 | ||
15 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 15 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
16 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = | 16 | 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 @@ | |||
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/ |
4 | 4 | ||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp udp | 6 | PLUGINS = tcp unix |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 11 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
12 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp | 12 | F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp |
13 | 13 | ||
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/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 11 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
12 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp | 12 | F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp |
13 | 13 | ||
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/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | |||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | ||
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = | ||
13 | 10 | ||
11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] | ||
12 | 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 @@ | |||
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ |
4 | 4 | ||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp udp | 6 | PLUGINS = tcp unix |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | 11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] |
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp | 12 | 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/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | 11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] |
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp | 12 | 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, | |||
604 | for (unsigned int i = 0; i < num_peers; i++) | 604 | for (unsigned int i = 0; i < num_peers; i++) |
605 | GNUNET_free (cfg_names[i]); | 605 | GNUNET_free (cfg_names[i]); |
606 | GNUNET_free (test_source); | 606 | GNUNET_free (test_source); |
607 | GNUNET_free_non_null (test_plugin); | 607 | GNUNET_free (test_plugin); |
608 | GNUNET_free (test_name); | 608 | GNUNET_free (test_name); |
609 | return ret; | 609 | return ret; |
610 | } | 610 | } |
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, | |||
349 | GNUNET_assert (0 == memcmp (&hello_id, | 349 | GNUNET_assert (0 == memcmp (&hello_id, |
350 | &p->id, | 350 | &p->id, |
351 | sizeof(hello_id))); | 351 | sizeof(hello_id))); |
352 | GNUNET_free_non_null (p->hello); | 352 | GNUNET_free (p->hello); |
353 | p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); | 353 | p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); |
354 | 354 | ||
355 | if (NULL != p->start_cb) | 355 | if (NULL != p->start_cb) |
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct | |||
460 | cfgname, | 460 | cfgname, |
461 | emsg); | 461 | emsg); |
462 | GNUNET_TRANSPORT_TESTING_stop_peer (p); | 462 | GNUNET_TRANSPORT_TESTING_stop_peer (p); |
463 | GNUNET_free_non_null (emsg); | 463 | GNUNET_free (emsg); |
464 | return NULL; | 464 | return NULL; |
465 | } | 465 | } |
466 | GNUNET_free_non_null (emsg); | 466 | GNUNET_free (emsg); |
467 | if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) | 467 | if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) |
468 | { | 468 | { |
469 | LOG (GNUNET_ERROR_TYPE_ERROR, | 469 | 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) | |||
970 | shutdown_process (proc); | 970 | shutdown_process (proc); |
971 | } | 971 | } |
972 | 972 | ||
973 | |||
973 | /** | 974 | /** |
974 | * @brief Task run at shutdown to kill the resolver process | 975 | * @brief Task run at shutdown to kill the resolver process |
975 | * | 976 | * |
@@ -982,6 +983,7 @@ shutdown_resolver (void *cls) | |||
982 | shutdown_process (proc); | 983 | shutdown_process (proc); |
983 | } | 984 | } |
984 | 985 | ||
986 | |||
985 | static void | 987 | static void |
986 | resolver_start (struct | 988 | resolver_start (struct |
987 | GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h) | 989 | GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h) |
@@ -990,16 +992,17 @@ resolver_start (struct | |||
990 | 992 | ||
991 | LOG (GNUNET_ERROR_TYPE_DEBUG, "resolver_start\n"); | 993 | LOG (GNUNET_ERROR_TYPE_DEBUG, "resolver_start\n"); |
992 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 994 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
993 | tc_h->resolver_proc = GNUNET_OS_start_process (GNUNET_YES, | 995 | tc_h->resolver_proc = GNUNET_OS_start_process ( |
994 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 996 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
995 | NULL, | 997 | | GNUNET_OS_USE_PIPE_CONTROL, |
996 | NULL, | 998 | NULL, |
997 | NULL, | 999 | NULL, |
998 | binary, | 1000 | NULL, |
999 | "gnunet-service-resolver", | 1001 | binary, |
1000 | "-c", | 1002 | "gnunet-service-resolver", |
1001 | tc_h->cfg_filename, | 1003 | "-c", |
1002 | NULL); | 1004 | tc_h->cfg_filename, |
1005 | NULL); | ||
1003 | if (NULL == tc_h->resolver_proc) | 1006 | if (NULL == tc_h->resolver_proc) |
1004 | { | 1007 | { |
1005 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start resolver service!"); | 1008 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start resolver service!"); |
@@ -1054,8 +1057,8 @@ nat_start ( | |||
1054 | 1057 | ||
1055 | LOG (GNUNET_ERROR_TYPE_DEBUG, "nat_start\n"); | 1058 | LOG (GNUNET_ERROR_TYPE_DEBUG, "nat_start\n"); |
1056 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-nat"); | 1059 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-nat"); |
1057 | tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_YES, | 1060 | tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
1058 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 1061 | | GNUNET_OS_USE_PIPE_CONTROL, |
1059 | NULL, | 1062 | NULL, |
1060 | NULL, | 1063 | NULL, |
1061 | NULL, | 1064 | NULL, |
@@ -1073,6 +1076,7 @@ nat_start ( | |||
1073 | GNUNET_free (binary); | 1076 | GNUNET_free (binary); |
1074 | } | 1077 | } |
1075 | 1078 | ||
1079 | |||
1076 | /** | 1080 | /** |
1077 | * @brief Start communicator part of transport service and communicator | 1081 | * @brief Start communicator part of transport service and communicator |
1078 | * | 1082 | * |
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 | |||
903 | }; | 903 | }; |
904 | 904 | ||
905 | 905 | ||
906 | |||
907 | /** | 906 | /** |
908 | * Remove queue, it is no longer available. | 907 | * Remove queue, it is no longer available. |
909 | */ | 908 | */ |
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) | |||
420 | GNUNET_MQ_send (qh->ch->mq, env); | 420 | GNUNET_MQ_send (qh->ch->mq, env); |
421 | } | 421 | } |
422 | 422 | ||
423 | |||
423 | /** | 424 | /** |
424 | * Send message to the transport service about queue @a qh | 425 | * Send message to the transport service about queue @a qh |
425 | * updated. | 426 | * updated. |
@@ -446,7 +447,6 @@ send_update_queue (struct GNUNET_TRANSPORT_QueueHandle *qh) | |||
446 | } | 447 | } |
447 | 448 | ||
448 | 449 | ||
449 | |||
450 | /** | 450 | /** |
451 | * Send message to the transport service about queue @a qh | 451 | * Send message to the transport service about queue @a qh |
452 | * being no longer available. | 452 | * being no longer available. |
@@ -1033,7 +1033,6 @@ GNUNET_TRANSPORT_communicator_mq_update ( | |||
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | 1035 | ||
1036 | |||
1037 | /** | 1036 | /** |
1038 | * Notify transport service that an MQ became unavailable due to a | 1037 | * Notify transport service that an MQ became unavailable due to a |
1039 | * disconnect or timeout. | 1038 | * 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, | |||
762 | reconnect (h); | 762 | reconnect (h); |
763 | if (NULL == h->mq) | 763 | if (NULL == h->mq) |
764 | { | 764 | { |
765 | GNUNET_free_non_null (h->handlers); | 765 | GNUNET_free (h->handlers); |
766 | GNUNET_free (h); | 766 | GNUNET_free (h); |
767 | return NULL; | 767 | return NULL; |
768 | } | 768 | } |
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle) | |||
792 | } | 792 | } |
793 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); | 793 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); |
794 | handle->neighbours = NULL; | 794 | handle->neighbours = NULL; |
795 | GNUNET_free_non_null (handle->handlers); | 795 | GNUNET_free (handle->handlers); |
796 | handle->handlers = NULL; | 796 | handle->handlers = NULL; |
797 | GNUNET_free (handle); | 797 | GNUNET_free (handle); |
798 | } | 798 | } |
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) | |||
622 | struct Neighbour *n; | 622 | struct Neighbour *n; |
623 | uint32_t bytes_msg; | 623 | uint32_t bytes_msg; |
624 | uint32_t bytes_physical; | 624 | uint32_t bytes_physical; |
625 | uint16_t success = ntohs (okm->success); | ||
625 | 626 | ||
626 | bytes_msg = ntohl (okm->bytes_msg); | 627 | bytes_msg = ntohs (okm->bytes_msg); |
627 | bytes_physical = ntohl (okm->bytes_physical); | 628 | bytes_physical = ntohl (okm->bytes_physical); |
628 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 629 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
629 | "Receiving SEND_OK message, transmission to %s %s.\n", | 630 | "Receiving SEND_OK message, transmission to %s %s.\n", |
630 | GNUNET_i2s (&okm->peer), | 631 | GNUNET_i2s (&okm->peer), |
631 | ntohl (okm->success) == GNUNET_OK ? "succeeded" : "failed"); | 632 | success == GNUNET_OK ? "succeeded" : "failed"); |
632 | n = neighbour_find (h, &okm->peer); | 633 | n = neighbour_find (h, &okm->peer); |
633 | if (NULL == n) | 634 | if (NULL == n) |
634 | { | 635 | { |
@@ -891,7 +892,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
891 | reconnect (h); | 892 | reconnect (h); |
892 | if (NULL == h->mq) | 893 | if (NULL == h->mq) |
893 | { | 894 | { |
894 | GNUNET_free_non_null (h->handlers); | 895 | GNUNET_free (h->handlers); |
895 | GNUNET_free (h); | 896 | GNUNET_free (h); |
896 | return NULL; | 897 | return NULL; |
897 | } | 898 | } |
@@ -922,7 +923,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle) | |||
922 | } | 923 | } |
923 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); | 924 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); |
924 | handle->neighbours = NULL; | 925 | handle->neighbours = NULL; |
925 | GNUNET_free_non_null (handle->handlers); | 926 | GNUNET_free (handle->handlers); |
926 | handle->handlers = NULL; | 927 | handle->handlers = NULL; |
927 | GNUNET_free (handle); | 928 | GNUNET_free (handle); |
928 | } | 929 | } |