From: Matthias Wachs Date: Wed, 2 Nov 2011 13:30:11 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~16109 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f73d97166b04ad2372d5a4bbcf0c66f95f7e15f0;p=oweals%2Fgnunet.git --- diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 25e5e9d5b..cf6e01306 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -1414,15 +1414,18 @@ void udp_broadcast_mst_cb (void *cls, void *client, 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);