From b123d4d0fd1483966936d0997cd26fa0b6a0f6b5 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 13 Dec 2011 15:15:12 +0000 Subject: [PATCH] added ATS addresstype information to unix --- src/transport/plugin_transport_unix.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 07dc50bb3..fc5719b3d 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -719,10 +719,12 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *currhdr, const struct sockaddr_un *un, size_t fromlen) { - struct GNUNET_ATS_Information distance; + struct GNUNET_ATS_Information ats[2]; - distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); - distance.value = htonl (UNIX_DIRECT_DISTANCE); + ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); + ats[0].value = htonl (UNIX_DIRECT_DISTANCE); + ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); + ats[1].value = htonl (GNUNET_ATS_NET_LOOPBACK); GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); @@ -731,7 +733,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, un->sun_path); #endif plugin->env->receive (plugin->env->cls, sender, currhdr, - (const struct GNUNET_ATS_Information *) &distance, 1, + (const struct GNUNET_ATS_Information *) &ats, 2, NULL, un->sun_path, strlen (un->sun_path) + 1); } -- 2.25.1