diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 314eefaec..66f9f5409 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -429,6 +429,8 @@ cleanup_validation_entry (void *cls, | |||
429 | if (GNUNET_YES == ve->known_to_ats) | 429 | if (GNUNET_YES == ve->known_to_ats) |
430 | { | 430 | { |
431 | GST_ats_expire_address (ve->address); | 431 | GST_ats_expire_address (ve->address); |
432 | GNUNET_assert (GNUNET_NO == | ||
433 | GST_ats_is_known_no_session (ve->address)); | ||
432 | ve->known_to_ats = GNUNET_NO; | 434 | ve->known_to_ats = GNUNET_NO; |
433 | } | 435 | } |
434 | GNUNET_HELLO_address_free (ve->address); | 436 | GNUNET_HELLO_address_free (ve->address); |
@@ -781,6 +783,8 @@ find_validation_entry (const struct GNUNET_HELLO_Address *address) | |||
781 | &validation_entry_match, &vemc); | 783 | &validation_entry_match, &vemc); |
782 | if (NULL != (ve = vemc.ve)) | 784 | if (NULL != (ve = vemc.ve)) |
783 | return ve; | 785 | return ve; |
786 | GNUNET_assert (GNUNET_NO == | ||
787 | GST_ats_is_known_no_session (address)); | ||
784 | ve = GNUNET_new (struct ValidationEntry); | 788 | ve = GNUNET_new (struct ValidationEntry); |
785 | ve->in_use = GNUNET_SYSERR; /* not defined */ | 789 | ve->in_use = GNUNET_SYSERR; /* not defined */ |
786 | ve->address = GNUNET_HELLO_address_copy (address); | 790 | ve->address = GNUNET_HELLO_address_copy (address); |
@@ -859,6 +863,8 @@ add_valid_address (void *cls, | |||
859 | { | 863 | { |
860 | ve->known_to_ats = GNUNET_YES; | 864 | ve->known_to_ats = GNUNET_YES; |
861 | GST_ats_add_address (address, &prop); | 865 | GST_ats_add_address (address, &prop); |
866 | GNUNET_assert (GNUNET_YES == | ||
867 | GST_ats_is_known_no_session (ve->address)); | ||
862 | } | 868 | } |
863 | return GNUNET_OK; | 869 | return GNUNET_OK; |
864 | } | 870 | } |
@@ -1490,6 +1496,8 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1490 | { | 1496 | { |
1491 | if (GNUNET_YES == ve->known_to_ats) | 1497 | if (GNUNET_YES == ve->known_to_ats) |
1492 | { | 1498 | { |
1499 | GNUNET_assert (GNUNET_YES == | ||
1500 | GST_ats_is_known_no_session (ve->address)); | ||
1493 | GST_ats_update_delay (ve->address, | 1501 | GST_ats_update_delay (ve->address, |
1494 | GNUNET_TIME_relative_divide (ve->latency, 2)); | 1502 | GNUNET_TIME_relative_divide (ve->latency, 2)); |
1495 | } | 1503 | } |
@@ -1500,8 +1508,12 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1500 | memset (&prop, 0, sizeof (prop)); | 1508 | memset (&prop, 0, sizeof (prop)); |
1501 | prop.scope = ve->network; | 1509 | prop.scope = ve->network; |
1502 | prop.delay = GNUNET_TIME_relative_divide (ve->latency, 2); | 1510 | prop.delay = GNUNET_TIME_relative_divide (ve->latency, 2); |
1511 | GNUNET_assert (GNUNET_NO == | ||
1512 | GST_ats_is_known_no_session (ve->address)); | ||
1503 | ve->known_to_ats = GNUNET_YES; | 1513 | ve->known_to_ats = GNUNET_YES; |
1504 | GST_ats_add_address (ve->address, &prop); | 1514 | GST_ats_add_address (ve->address, &prop); |
1515 | GNUNET_assert (GNUNET_YES == | ||
1516 | GST_ats_is_known_no_session (ve->address)); | ||
1505 | } | 1517 | } |
1506 | } | 1518 | } |
1507 | if (validations_running > 0) | 1519 | if (validations_running > 0) |