aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-daemon-testbed-underlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/gnunet-daemon-testbed-underlay.c')
-rw-r--r--src/testbed/gnunet-daemon-testbed-underlay.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c
index 49bfc64bf..e41cf4a4d 100644
--- a/src/testbed/gnunet-daemon-testbed-underlay.c
+++ b/src/testbed/gnunet-daemon-testbed-underlay.c
@@ -365,13 +365,15 @@ run (void *cls, char *const *args, const char *cfgfile,
365 struct WhiteListRow *wl_head; 365 struct WhiteListRow *wl_head;
366 struct WhiteListRow *wl_entry; 366 struct WhiteListRow *wl_entry;
367 struct GNUNET_PeerIdentity identity; 367 struct GNUNET_PeerIdentity identity;
368 struct GNUNET_ATS_Information params[1]; 368 struct GNUNET_ATS_Properties prop;
369 struct GNUNET_TIME_Relative delay;
369 unsigned long long pid; 370 unsigned long long pid;
370 unsigned int nrows; 371 unsigned int nrows;
371 int ret; 372 int ret;
372 373
373 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (c, "TESTBED", 374 if (GNUNET_OK !=
374 "PEERID", &pid)) 375 GNUNET_CONFIGURATION_get_value_number (c, "TESTBED",
376 "PEERID", &pid))
375 { 377 {
376 GNUNET_break (0); 378 GNUNET_break (0);
377 return; 379 return;
@@ -418,11 +420,11 @@ run (void *cls, char *const *args, const char *cfgfile,
418 goto close_db; 420 goto close_db;
419 } 421 }
420 map = GNUNET_CONTAINER_multipeermap_create (nrows, GNUNET_NO); 422 map = GNUNET_CONTAINER_multipeermap_create (nrows, GNUNET_NO);
421 params[0].type = GNUNET_ATS_QUALITY_NET_DELAY;
422 while (NULL != (wl_entry = wl_head)) 423 while (NULL != (wl_entry = wl_head))
423 { 424 {
424 wl_head = wl_entry->next; 425 wl_head = wl_entry->next;
425 params[0].value = wl_entry->latency; 426 delay.rel_value_us = wl_entry->latency;
427 memset (&prop, 0, sizeof (prop));
426 GNUNET_assert (GNUNET_OK == get_identity (wl_entry->id, &identity)); 428 GNUNET_assert (GNUNET_OK == get_identity (wl_entry->id, &identity));
427 GNUNET_break (GNUNET_OK == 429 GNUNET_break (GNUNET_OK ==
428 GNUNET_CONTAINER_multipeermap_put (map, &identity, &identity, 430 GNUNET_CONTAINER_multipeermap_put (map, &identity, &identity,
@@ -432,9 +434,9 @@ run (void *cls, char *const *args, const char *cfgfile,
432 GNUNET_i2s (&identity)); 434 GNUNET_i2s (&identity));
433 GNUNET_TRANSPORT_set_traffic_metric (transport, 435 GNUNET_TRANSPORT_set_traffic_metric (transport,
434 &identity, 436 &identity,
435 GNUNET_YES, 437 &prop,
436 GNUNET_YES, /* FIXME: Separate inbound, outboud metrics */ 438 delay,
437 params, 1); 439 delay);
438 GNUNET_free (wl_entry); 440 GNUNET_free (wl_entry);
439 } 441 }
440 bh = GNUNET_TRANSPORT_blacklist (c, &check_access, NULL); 442 bh = GNUNET_TRANSPORT_blacklist (c, &check_access, NULL);