aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-05-29 09:24:41 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-05-29 09:24:41 +0000
commitc31d90aa8ec76f9a15f486cb887ec3ac7309bf0f (patch)
tree3e4ada669a07f9d1f27cacec37b7d026a32b2f41 /src/transport/plugin_transport_unix.c
parentcec8e7eee09c84d32e7e8c6ae18d03a43eaa3e13 (diff)
downloadgnunet-c31d90aa8ec76f9a15f486cb887ec3ac7309bf0f.tar.gz
gnunet-c31d90aa8ec76f9a15f486cb887ec3ac7309bf0f.zip
- fix address length
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index ed418b8e7..2725551e0 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -677,7 +677,6 @@ unix_plugin_get_session (void *cls,
677 } 677 }
678 678
679 /* Create a new session */ 679 /* Create a new session */
680
681 s = GNUNET_malloc (sizeof (struct Session) + address->address_length); 680 s = GNUNET_malloc (sizeof (struct Session) + address->address_length);
682 s->addr = &s[1]; 681 s->addr = &s[1];
683 s->addrlen = address->address_length; 682 s->addrlen = address->address_length;
@@ -828,7 +827,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
828 GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received", 827 GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received",
829 plugin->bytes_in_recv, GNUNET_NO); 828 plugin->bytes_in_recv, GNUNET_NO);
830 829
831 addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path)); 830 addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path) + 1);
832 s = lookup_session (plugin, sender, un); 831 s = lookup_session (plugin, sender, un);
833 if (NULL == s) 832 if (NULL == s)
834 s = unix_plugin_get_session (plugin, addr); 833 s = unix_plugin_get_session (plugin, addr);