aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-11-02 13:30:11 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-11-02 13:30:11 +0000
commitf73d97166b04ad2372d5a4bbcf0c66f95f7e15f0 (patch)
treebe394e6dc53fc5d3710553d3c31d048d1e2d359a /src/transport/plugin_transport_udp.c
parent0ac0a301c63b5cb1fed345e620f9a106bcce9850 (diff)
downloadgnunet-f73d97166b04ad2372d5a4bbcf0c66f95f7e15f0.tar.gz
gnunet-f73d97166b04ad2372d5a4bbcf0c66f95f7e15f0.zip
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c9
1 files changed, 6 insertions, 3 deletions
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,
1414 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON != ntohs(msg->header.type)) 1414 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON != ntohs(msg->header.type))
1415 return; 1415 return;
1416 1416
1417 LOG (GNUNET_ERROR_TYPE_DEBUG, 1417 LOG (GNUNET_ERROR_TYPE_ERROR,
1418 "Received beacon with %u bytes from peer `%s' via address `%s'\n", 1418 "Received beacon with %u bytes from peer `%s' via address `%s'\n",
1419 ntohs(msg->header.size), 1419 ntohs(msg->header.size),
1420 GNUNET_i2s (&msg->sender), 1420 GNUNET_i2s (&msg->sender),
1421 udp_address_to_string(NULL, &mc->addr, sizeof (mc->addr))); 1421 udp_address_to_string(NULL, &mc->addr, sizeof (mc->addr)));
1422 1422
1423 struct GNUNET_ATS_Information ats;
1424 ats.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
1425 ats.value = htonl (1);
1423 1426
1424 hello = &message[1]; 1427 hello = (struct GNUNET_MessageHeader *) &msg[1];
1425 plugin->env->receive (plugin->env->cls, &msg->sender, hello, NULL, 0, NULL, (const char *) &mc->addr, sizeof (mc->addr)); 1428 plugin->env->receive (plugin->env->cls, &msg->sender, hello, &ats, 1, NULL, (const char *) &mc->addr, sizeof (mc->addr));
1426 1429
1427 GNUNET_STATISTICS_update(plugin->env->stats, 1430 GNUNET_STATISTICS_update(plugin->env->stats,
1428 _("# HELLO beacons received via udp"), 1, GNUNET_NO); 1431 _("# HELLO beacons received via udp"), 1, GNUNET_NO);