aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-30 11:59:49 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-30 11:59:49 +0000
commitafef053a2ee08002fe50f3e1842e5c8153e6c507 (patch)
tree8ffc70786908ded09ee74007df75fe33f77d4b72 /src/transport/plugin_transport_http_server.c
parent4eb0a75f98349e55a405212404b258a987fb6145 (diff)
downloadgnunet-afef053a2ee08002fe50f3e1842e5c8153e6c507.tar.gz
gnunet-afef053a2ee08002fe50f3e1842e5c8153e6c507.zip
-no longer pass distance information from non-DV plugins
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index ba07ee95e..fb6181a6b 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1269,7 +1269,8 @@ server_receive_mst_cb (void *cls, void *client,
1269 const struct GNUNET_MessageHeader *message) 1269 const struct GNUNET_MessageHeader *message)
1270{ 1270{
1271 struct Session *s = cls; 1271 struct Session *s = cls;
1272 struct GNUNET_ATS_Information atsi[2]; 1272 struct HTTP_Server_Plugin *plugin = s->plugin;
1273 struct GNUNET_ATS_Information atsi;
1273 struct GNUNET_TIME_Relative delay; 1274 struct GNUNET_TIME_Relative delay;
1274 char *stat_txt; 1275 char *stat_txt;
1275 1276
@@ -1277,12 +1278,9 @@ server_receive_mst_cb (void *cls, void *client,
1277 if (GNUNET_NO == server_exist_session(p, s)) 1278 if (GNUNET_NO == server_exist_session(p, s))
1278 return GNUNET_OK; 1279 return GNUNET_OK;
1279 1280
1280 struct HTTP_Server_Plugin *plugin = s->plugin;
1281 1281
1282 atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 1282 atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
1283 atsi[0].value = htonl (1); 1283 atsi.value = s->ats_address_network_type;
1284 atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
1285 atsi[1].value = s->ats_address_network_type;
1286 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED)); 1284 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED));
1287 1285
1288 1286
@@ -1292,11 +1290,11 @@ server_receive_mst_cb (void *cls, void *client,
1292 s, s->addr, s->addrlen); 1290 s, s->addr, s->addrlen);
1293 1291
1294 plugin->env->update_address_metrics (plugin->env->cls, 1292 plugin->env->update_address_metrics (plugin->env->cls,
1295 &s->target, 1293 &s->target,
1296 s->addr, 1294 s->addr,
1297 s->addrlen, 1295 s->addrlen,
1298 s, 1296 s,
1299 (struct GNUNET_ATS_Information *) &atsi, 2); 1297 &atsi, 1);
1300 1298
1301 GNUNET_asprintf (&stat_txt, "# bytes received via %s_server", plugin->protocol); 1299 GNUNET_asprintf (&stat_txt, "# bytes received via %s_server", plugin->protocol);
1302 GNUNET_STATISTICS_update (plugin->env->stats, 1300 GNUNET_STATISTICS_update (plugin->env->stats,