From: Matthias Wachs Date: Tue, 13 Dec 2011 15:15:12 +0000 (+0000) Subject: added ATS addresstype information to unix X-Git-Tag: initial-import-from-subversion-38251~15654 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b123d4d0fd1483966936d0997cd26fa0b6a0f6b5;p=oweals%2Fgnunet.git added ATS addresstype information to unix --- 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); }