summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-21 20:20:33 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-21 20:20:33 +0100
commit647d88d649c267220feb8b5f53ec3e96359a72fc (patch)
treef0e78fbaed43f946b9e49ab42942303697584fa6 /src/transport
parent0c7478479c31e75392774b17d850c4325e4ff9a8 (diff)
fix sun_len issue (#4816) by adding test and fixing typo
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_tcp.c2
-rw-r--r--src/transport/plugin_transport_unix.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 4ed5b38f7..34bbd00e0 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -549,7 +549,7 @@ add_unixpath (struct sockaddr **saddrs,
if (GNUNET_YES == abstract)
un->sun_path[0] = '\0';
#endif
-#if HAVE_SOCKADDR_IN_SIN_LEN
+#if HAVE_SOCKADDR_UN_SUN_LEN
un->sun_len = (u_char) sizeof (struct sockaddr_un);
#endif
*saddrs = (struct sockaddr *) un;
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 49a5e89ed..6bcb7290f 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -566,7 +566,7 @@ unix_address_to_sockaddr (const char *unixpath,
GNUNET_memcpy (un->sun_path, unixpath, slen);
un->sun_path[slen] = '\0';
slen = sizeof (struct sockaddr_un);
-#if HAVE_SOCKADDR_IN_SIN_LEN
+#if HAVE_SOCKADDR_UN_SUN_LEN
un->sun_len = (u_char) slen;
#endif
(*sock_len) = slen;
@@ -1229,7 +1229,7 @@ unix_plugin_select_read (void *cls)
{
struct Plugin *plugin = cls;
const struct GNUNET_SCHEDULER_TaskContext *tc;
-
+
plugin->read_task = NULL;
tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY))
@@ -1252,7 +1252,7 @@ unix_plugin_select_write (void *cls)
{
struct Plugin *plugin = cls;
const struct GNUNET_SCHEDULER_TaskContext *tc;
-
+
plugin->write_task = NULL;
tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY))