gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18575 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r18575 - gnunet/src/transport
Date: Tue, 13 Dec 2011 16:15:12 +0100

Author: wachs
Date: 2011-12-13 16:15:12 +0100 (Tue, 13 Dec 2011)
New Revision: 18575

Modified:
   gnunet/src/transport/plugin_transport_unix.c
Log:
added ATS addresstype information to unix


Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c        2011-12-13 15:13:07 UTC 
(rev 18574)
+++ gnunet/src/transport/plugin_transport_unix.c        2011-12-13 15:15:12 UTC 
(rev 18575)
@@ -719,10 +719,12 @@
                     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 @@
               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);
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]