X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdv%2Fplugin_transport_dv.c;h=697ca0c4cf211e3fa5cea15eaacdfc6efda51e57;hb=19377520016cc644070d207af34ae3e76618fdc8;hp=68c584822cac8000c2ab2fea8d41fa76d0b1a5f2;hpb=bdc3b54372a92874c2ecb58069eac5bdfe6fcddc;p=oweals%2Fgnunet.git diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index 68c584822..697ca0c4c 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c @@ -34,7 +34,7 @@ #include "gnunet_statistics_service.h" #include "gnunet_dv_service.h" #include "gnunet_transport_service.h" -#include "../transport/gnunet_transport_plugin.h" +#include "gnunet_transport_plugin.h" #include "dv.h" #define DEBUG_TEMPLATE GNUNET_NO @@ -162,11 +162,18 @@ void handle_dv_message_received (void *cls, my_id, GNUNET_i2s(sender), ntohs(((struct GNUNET_MessageHeader *)msg)->type), distance); GNUNET_free_non_null(my_id); #endif + struct GNUNET_TRANSPORT_ATS_Information ats[2]; + ats[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); + ats[0].value = htonl (distance); + ats[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); + ats[1].value = htonl (0); + plugin->env->receive(plugin->env->cls, sender, (struct GNUNET_MessageHeader *)msg, - distance, - NULL, + (const struct GNUNET_TRANSPORT_ATS_Information *) &ats, + 2, + NULL, sender_address, sender_address_len);