diff options
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index 8e3692b8e..f55bb4611 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -584,8 +584,8 @@ struct CompareAddressContext | |||
584 | * @return #GNUNET_YES to continue, #GNUNET_NO if address is founce | 584 | * @return #GNUNET_YES to continue, #GNUNET_NO if address is founce |
585 | */ | 585 | */ |
586 | static int | 586 | static int |
587 | compare_address_it (void *cls, | 587 | compare_address_it (void *cls, |
588 | const struct GNUNET_PeerIdentity *key, | 588 | const struct GNUNET_PeerIdentity *key, |
589 | void *value) | 589 | void *value) |
590 | { | 590 | { |
591 | struct CompareAddressContext *cac = cls; | 591 | struct CompareAddressContext *cac = cls; |
@@ -675,7 +675,7 @@ find_equivalent_address (struct GAS_Addresses_Handle *handle, | |||
675 | cac.base_address = NULL; | 675 | cac.base_address = NULL; |
676 | cac.search = addr; | 676 | cac.search = addr; |
677 | GNUNET_CONTAINER_multipeermap_get_multiple (handle->addresses, | 677 | GNUNET_CONTAINER_multipeermap_get_multiple (handle->addresses, |
678 | peer, | 678 | peer, |
679 | &compare_address_it, &cac); | 679 | &compare_address_it, &cac); |
680 | 680 | ||
681 | if (cac.exact_address == NULL) | 681 | if (cac.exact_address == NULL) |
@@ -1076,7 +1076,7 @@ destroy_by_session_id (void *cls, | |||
1076 | 1076 | ||
1077 | /* Notify solver about deletion */ | 1077 | /* Notify solver about deletion */ |
1078 | GNUNET_assert( | 1078 | GNUNET_assert( |
1079 | GNUNET_YES == GNUNET_CONTAINER_multipeermap_remove (handle->addresses, | 1079 | GNUNET_YES == GNUNET_CONTAINER_multipeermap_remove (handle->addresses, |
1080 | &aa->peer, aa)); | 1080 | &aa->peer, aa)); |
1081 | handle->s_del (handle->solver, aa, GNUNET_NO); | 1081 | handle->s_del (handle->solver, aa, GNUNET_NO); |
1082 | free_address (aa); | 1082 | free_address (aa); |
@@ -1321,16 +1321,16 @@ GAS_addresses_request_address (struct GAS_Addresses_Handle *handle, | |||
1321 | * @return #GNUNET_OK to continue | 1321 | * @return #GNUNET_OK to continue |
1322 | */ | 1322 | */ |
1323 | static int | 1323 | static int |
1324 | reset_address_it (void *cls, | 1324 | reset_address_it (void *cls, |
1325 | const struct GNUNET_PeerIdentity *key, | 1325 | const struct GNUNET_PeerIdentity *key, |
1326 | void *value) | 1326 | void *value) |
1327 | { | 1327 | { |
1328 | struct ATS_Address *aa = value; | 1328 | struct ATS_Address *aa = value; |
1329 | 1329 | ||
1330 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1330 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1331 | "Resetting interval for peer `%s' address %p from %llu to 0\n", | 1331 | "Resetting interval for peer `%s' address %p from %llu to 0\n", |
1332 | GNUNET_i2s (&aa->peer), | 1332 | GNUNET_i2s (&aa->peer), |
1333 | aa, | 1333 | aa, |
1334 | aa->block_interval); | 1334 | aa->block_interval); |
1335 | aa->blocked_until = GNUNET_TIME_UNIT_ZERO_ABS; | 1335 | aa->blocked_until = GNUNET_TIME_UNIT_ZERO_ABS; |
1336 | aa->block_interval = GNUNET_TIME_UNIT_ZERO; | 1336 | aa->block_interval = GNUNET_TIME_UNIT_ZERO; |
@@ -1846,7 +1846,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1846 | GNUNET_ATS_NetworkTypeCount); | 1846 | GNUNET_ATS_NetworkTypeCount); |
1847 | 1847 | ||
1848 | ah->solver = ah->s_init (cfg, stats, ah->addresses, quotas, quotas_in, | 1848 | ah->solver = ah->s_init (cfg, stats, ah->addresses, quotas, quotas_in, |
1849 | quotas_out, quota_count, | 1849 | quotas_out, quota_count, |
1850 | &bandwidth_changed_cb, ah, &get_preferences_cb, | 1850 | &bandwidth_changed_cb, ah, &get_preferences_cb, |
1851 | NULL, &get_property_cb, NULL ); | 1851 | NULL, &get_property_cb, NULL ); |
1852 | if (NULL == ah->solver) | 1852 | if (NULL == ah->solver) |
@@ -1873,7 +1873,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1873 | * @return #GNUNET_OK (continue to iterate) | 1873 | * @return #GNUNET_OK (continue to iterate) |
1874 | */ | 1874 | */ |
1875 | static int | 1875 | static int |
1876 | destroy_all_address_it (void *cls, | 1876 | destroy_all_address_it (void *cls, |
1877 | const struct GNUNET_PeerIdentity *key, | 1877 | const struct GNUNET_PeerIdentity *key, |
1878 | void *value) | 1878 | void *value) |
1879 | { | 1879 | { |
@@ -1881,7 +1881,7 @@ destroy_all_address_it (void *cls, | |||
1881 | struct ATS_Address *aa = value; | 1881 | struct ATS_Address *aa = value; |
1882 | 1882 | ||
1883 | /* Remove */ | 1883 | /* Remove */ |
1884 | GNUNET_assert(GNUNET_YES == | 1884 | GNUNET_assert(GNUNET_YES == |
1885 | GNUNET_CONTAINER_multipeermap_remove (handle->addresses, key, value)); | 1885 | GNUNET_CONTAINER_multipeermap_remove (handle->addresses, key, value)); |
1886 | /* Notify */ | 1886 | /* Notify */ |
1887 | handle->s_del (handle->solver, aa, GNUNET_NO); | 1887 | handle->s_del (handle->solver, aa, GNUNET_NO); |
@@ -1958,7 +1958,7 @@ struct PeerIteratorContext | |||
1958 | * @return #GNUNET_OK to continue | 1958 | * @return #GNUNET_OK to continue |
1959 | */ | 1959 | */ |
1960 | static int | 1960 | static int |
1961 | peer_it (void *cls, | 1961 | peer_it (void *cls, |
1962 | const struct GNUNET_PeerIdentity *key, | 1962 | const struct GNUNET_PeerIdentity *key, |
1963 | void *value) | 1963 | void *value) |
1964 | { | 1964 | { |
@@ -2000,7 +2000,7 @@ GAS_addresses_iterate_peers (struct GAS_Addresses_Handle *handle, | |||
2000 | ip_ctx.it_cls = p_it_cls; | 2000 | ip_ctx.it_cls = p_it_cls; |
2001 | ip_ctx.peers_returned = GNUNET_CONTAINER_multipeermap_create (size, | 2001 | ip_ctx.peers_returned = GNUNET_CONTAINER_multipeermap_create (size, |
2002 | GNUNET_NO); | 2002 | GNUNET_NO); |
2003 | GNUNET_CONTAINER_multipeermap_iterate (handle->addresses, | 2003 | GNUNET_CONTAINER_multipeermap_iterate (handle->addresses, |
2004 | &peer_it, | 2004 | &peer_it, |
2005 | &ip_ctx); | 2005 | &ip_ctx); |
2006 | GNUNET_CONTAINER_multipeermap_destroy (ip_ctx.peers_returned); | 2006 | GNUNET_CONTAINER_multipeermap_destroy (ip_ctx.peers_returned); |