diff options
Diffstat (limited to 'src/dv/test_transport_api_dv.c')
-rw-r--r-- | src/dv/test_transport_api_dv.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index 5f40fb522..942ee07c0 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -394,15 +394,16 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
394 | * @return connected transport distance | 394 | * @return connected transport distance |
395 | */ | 395 | */ |
396 | static uint32_t | 396 | static uint32_t |
397 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 397 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi, |
398 | unsigned int atsi_count) | ||
398 | { | 399 | { |
399 | unsigned int i; | 400 | unsigned int i; |
400 | 401 | ||
401 | for (i = 0; i < atsi_count; i++) | 402 | for (i = 0; i < atsi_count; i++) |
402 | { | 403 | { |
403 | if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE) | 404 | if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE) |
404 | return ntohl (atsi->value); | 405 | return ntohl (atsi->value); |
405 | } | 406 | } |
406 | 407 | ||
407 | GNUNET_break (0); | 408 | GNUNET_break (0); |
408 | /* FIXME: we do not have distance data? Assume direct neighbor. */ | 409 | /* FIXME: we do not have distance data? Assume direct neighbor. */ |
@@ -411,8 +412,7 @@ get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_ | |||
411 | 412 | ||
412 | 413 | ||
413 | static int | 414 | static int |
414 | process_mtype (void *cls, | 415 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
415 | const struct GNUNET_PeerIdentity *peer, | ||
416 | const struct GNUNET_MessageHeader *message, | 416 | const struct GNUNET_MessageHeader *message, |
417 | const struct GNUNET_ATS_Information *atsi, | 417 | const struct GNUNET_ATS_Information *atsi, |
418 | unsigned int atsi_count) | 418 | unsigned int atsi_count) |
@@ -464,7 +464,8 @@ process_mtype (void *cls, | |||
464 | { | 464 | { |
465 | GNUNET_SCHEDULER_cancel (die_task); | 465 | GNUNET_SCHEDULER_cancel (die_task); |
466 | #if VERBOSE | 466 | #if VERBOSE |
467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scheduling timeout from DV connections.\n"); | 467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
468 | "Scheduling timeout from DV connections.\n"); | ||
468 | #endif | 469 | #endif |
469 | die_task = | 470 | die_task = |
470 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, | 471 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, |