summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-13 00:11:53 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-13 00:11:53 +0000
commit3e693f3ceb1b3425b17900423628aecb609f2433 (patch)
tree2dd5d5694771de9458eb8c394ce704dea1d0c87e /src/transport
parentc1fa22fd40d14035c8d323cb4ae8724970850e73 (diff)
-fixing misc minor bugs and style issues (unchecked return values, memory leaks, dead code
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport_validation.c1
-rw-r--r--src/transport/gnunet-transport.c11
-rw-r--r--src/transport/plugin_transport_tcp.c4
-rw-r--r--src/transport/plugin_transport_unix.c1
4 files changed, 4 insertions, 13 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 8f563de02..2022a8c47 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -578,6 +578,7 @@ transmit_ping_if_allowed (void *cls,
ve->address->address,
ve->address->address_length);
papi = GST_plugins_find (ve->address->transport_name);
+ GNUNET_assert (NULL != papi);
session = papi->get_session (papi->cls,
ve->address);
if (NULL == session)
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 8e8c173af..bf586b7f0 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -940,17 +940,6 @@ process_validation_cb (void *cls,
_("Monitor disconnected from transport service. Reconnecting.\n"));
return;
}
-
- /* done */
- vic = NULL;
- if (NULL != end)
- GNUNET_SCHEDULER_cancel (end);
- end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
- return;
- }
- if (NULL == address)
- {
- /* invalid response */
vic = NULL;
if (NULL != end)
GNUNET_SCHEDULER_cancel (end);
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 167d1c490..313cbf7f0 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1752,7 +1752,7 @@ tcp_plugin_get_session (void *cls,
plugin->cur_connections++;
if (plugin->cur_connections == plugin->max_connections)
{
- GNUNET_STATISTICS_update (session->plugin->env->stats,
+ GNUNET_STATISTICS_update (plugin->env->stats,
gettext_noop ("# TCP service suspended"),
1,
GNUNET_NO);
@@ -2330,7 +2330,7 @@ handle_tcp_welcome (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("TCP connection limit reached, suspending server\n"));
- GNUNET_STATISTICS_update (session->plugin->env->stats,
+ GNUNET_STATISTICS_update (plugin->env->stats,
gettext_noop ("# TCP service suspended"),
1,
GNUNET_NO);
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index ddb5f747c..1866c56a4 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1383,6 +1383,7 @@ unix_transport_server_start (void *cls)
if (NULL == plugin->unix_sock.desc)
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
+ GNUNET_free (un);
return GNUNET_SYSERR;
}
if ('\0' != un->sun_path[0])