gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r17918 - gnunet/src/transport
Date: Wed, 2 Nov 2011 14:30:11 +0100

Author: wachs
Date: 2011-11-02 14:30:11 +0100 (Wed, 02 Nov 2011)
New Revision: 17918

Modified:
   gnunet/src/transport/plugin_transport_udp.c
Log:


Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2011-11-02 12:09:39 UTC (rev 
17917)
+++ gnunet/src/transport/plugin_transport_udp.c 2011-11-02 13:30:11 UTC (rev 
17918)
@@ -1414,15 +1414,18 @@
   if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON != 
ntohs(msg->header.type))
     return;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
+  LOG (GNUNET_ERROR_TYPE_ERROR,
               "Received beacon with %u bytes from peer `%s' via address 
`%s'\n",
               ntohs(msg->header.size),
               GNUNET_i2s (&msg->sender),
               udp_address_to_string(NULL, &mc->addr, sizeof (mc->addr)));
 
+  struct GNUNET_ATS_Information ats;
+  ats.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
+  ats.value = htonl (1);
 
-  hello = &message[1];
-  plugin->env->receive (plugin->env->cls, &msg->sender, hello, NULL, 0, NULL, 
(const char *) &mc->addr, sizeof (mc->addr));
+  hello = (struct GNUNET_MessageHeader *) &msg[1];
+  plugin->env->receive (plugin->env->cls, &msg->sender, hello, &ats, 1, NULL, 
(const char *) &mc->addr, sizeof (mc->addr));
 
   GNUNET_STATISTICS_update(plugin->env->stats, 
                           _("# HELLO beacons received via udp"), 1, GNUNET_NO);




reply via email to

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