gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r26617 - gnunet/src/dv


From: gnunet
Subject: [GNUnet-SVN] r26617 - gnunet/src/dv
Date: Wed, 27 Mar 2013 10:16:06 +0100

Author: grothoff
Date: 2013-03-27 10:16:06 +0100 (Wed, 27 Mar 2013)
New Revision: 26617

Modified:
   gnunet/src/dv/plugin_transport_dv.c
Log:
-fixing #2837

Modified: gnunet/src/dv/plugin_transport_dv.c
===================================================================
--- gnunet/src/dv/plugin_transport_dv.c 2013-03-27 08:55:57 UTC (rev 26616)
+++ gnunet/src/dv/plugin_transport_dv.c 2013-03-27 09:16:06 UTC (rev 26617)
@@ -172,7 +172,16 @@
 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);
 }
 
 




reply via email to

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