From ea0cc0ab9f05fd2a7d188e5eaa86cc8a5ae8f599 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 27 Mar 2013 09:16:06 +0000 Subject: -fixing #2837 --- src/dv/plugin_transport_dv.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index 84afb8344..f094075e8 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c @@ -172,7 +172,16 @@ struct Plugin static void notify_distance_change (struct Session *session) { - GNUNET_break (0); // FIXME: need extended plugin API! + struct Plugin *plugin = session->plugin; + struct GNUNET_ATS_Information ats; + + ats.type = htonl ((uint32_t) GNUNET_ATS_QUALITY_NET_DISTANCE); + ats.value = htonl (session->distance); + plugin->env->update_address_metrics (plugin->env->cls, + &session->sender, + "", 0, + session, + &ats, 1); } -- cgit v1.2.3