aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/gnunet-service-transport.c6
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c14
-rw-r--r--src/transport/gnunet-service-transport_validation.c13
-rw-r--r--src/transport/gnunet-service-transport_validation.h4
4 files changed, 19 insertions, 18 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index d4d8828d0..6c068bec9 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -118,7 +118,9 @@ process_hello_update (void *cls, const struct GNUNET_MessageHeader *hello)
118 * We received some payload. Prepare to pass it on to our clients. 118 * We received some payload. Prepare to pass it on to our clients.
119 * 119 *
120 * @param peer (claimed) identity of the other peer 120 * @param peer (claimed) identity of the other peer
121 * @param message the message, never NULL 121 * @param address the address
122 * @param session session used
123 * @param msg the message to process
122 * @param ats performance information 124 * @param ats performance information
123 * @param ats_count number of records in ats 125 * @param ats_count number of records in ats
124 * @return how long the plugin should wait until receiving more data 126 * @return how long the plugin should wait until receiving more data
@@ -369,6 +371,8 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
369 * @param session session to use (if available) 371 * @param session session to use (if available)
370 * @param bandwidth_out assigned outbound bandwidth for the connection, 0 to disconnect from peer 372 * @param bandwidth_out assigned outbound bandwidth for the connection, 0 to disconnect from peer
371 * @param bandwidth_in assigned inbound bandwidth for the connection, 0 to disconnect from peer 373 * @param bandwidth_in assigned inbound bandwidth for the connection, 0 to disconnect from peer
374 * @param ats ATS information
375 * @param number of ATS elements
372 */ 376 */
373static void 377static void
374ats_request_address_change (void *cls, 378ats_request_address_change (void *cls,
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index a0f6e2e42..348378bc8 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -894,7 +894,7 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
894 GNUNET_assert (NULL != n->address); 894 GNUNET_assert (NULL != n->address);
895 if (n->address_state == USED) 895 if (n->address_state == USED)
896 { 896 {
897 GST_validation_set_address_use (&n->id, n->address, n->session, 897 GST_validation_set_address_use (n->address, n->session,
898 GNUNET_NO); 898 GNUNET_NO);
899 899
900 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO); 900 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
@@ -1245,7 +1245,7 @@ send_switch_address_continuation (void *cls,
1245 case S_CONNECTED: 1245 case S_CONNECTED:
1246 if (n->address_state == FRESH) 1246 if (n->address_state == FRESH)
1247 { 1247 {
1248 GST_validation_set_address_use (&n->id, cc->address, cc->session, 1248 GST_validation_set_address_use (cc->address, cc->session,
1249 GNUNET_YES); 1249 GNUNET_YES);
1250 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0); 1250 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0);
1251 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES); 1251 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES);
@@ -1265,7 +1265,7 @@ send_switch_address_continuation (void *cls,
1265 1265
1266 if (n->address_state == FRESH) 1266 if (n->address_state == FRESH)
1267 { 1267 {
1268 GST_validation_set_address_use (&n->id, cc->address, cc->session, 1268 GST_validation_set_address_use (cc->address, cc->session,
1269 GNUNET_YES); 1269 GNUNET_YES);
1270 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0); 1270 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0);
1271 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES); 1271 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES);
@@ -1431,7 +1431,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1431 GNUNET_assert (NULL != n->address); 1431 GNUNET_assert (NULL != n->address);
1432 if (n->address_state == USED) 1432 if (n->address_state == USED)
1433 { 1433 {
1434 GST_validation_set_address_use (&n->id, n->address, n->session, 1434 GST_validation_set_address_use (n->address, n->session,
1435 GNUNET_NO); 1435 GNUNET_NO);
1436 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO); 1436 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
1437 n->address_state = UNUSED; 1437 n->address_state = UNUSED;
@@ -1698,7 +1698,7 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
1698 { 1698 {
1699 if (n->address_state == USED) 1699 if (n->address_state == USED)
1700 { 1700 {
1701 GST_validation_set_address_use (&n->id, n->address, n->session, 1701 GST_validation_set_address_use (n->address, n->session,
1702 GNUNET_NO); 1702 GNUNET_NO);
1703 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO); 1703 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
1704 n->address_state = UNUSED; 1704 n->address_state = UNUSED;
@@ -2334,7 +2334,7 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
2334 GNUNET_assert (NULL != n->address); 2334 GNUNET_assert (NULL != n->address);
2335 if (n->address_state == FRESH) 2335 if (n->address_state == FRESH)
2336 { 2336 {
2337 GST_validation_set_address_use (&n->id, n->address, n->session, GNUNET_YES); 2337 GST_validation_set_address_use (n->address, n->session, GNUNET_YES);
2338 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES); 2338 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES);
2339 n->address_state = USED; 2339 n->address_state = USED;
2340 } 2340 }
@@ -2421,7 +2421,7 @@ GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
2421 GNUNET_assert (n->address != NULL); 2421 GNUNET_assert (n->address != NULL);
2422 if (n->address_state == FRESH) 2422 if (n->address_state == FRESH)
2423 { 2423 {
2424 GST_validation_set_address_use (&n->id, n->address, n->session, GNUNET_YES); 2424 GST_validation_set_address_use (n->address, n->session, GNUNET_YES);
2425 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES); 2425 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES);
2426 n->address_state = USED; 2426 n->address_state = USED;
2427 } 2427 }
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 641214b39..559589576 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -705,13 +705,12 @@ GST_validation_stop ()
705 * 705 *
706 * @param cls the PONG message 706 * @param cls the PONG message
707 * @param public_key public key for the peer, never NULL 707 * @param public_key public key for the peer, never NULL
708 * @param target peer this change is about, never NULL
709 * @param valid_until is ZERO if we never validated the address, 708 * @param valid_until is ZERO if we never validated the address,
710 * otherwise a time up to when we consider it (or was) valid 709 * otherwise a time up to when we consider it (or was) valid
711 * @param validation_block is FOREVER if the address is for an unsupported plugin (from PEERINFO) 710 * @param validation_block is FOREVER if the address is for an unsupported plugin (from PEERINFO)
712 * is ZERO if the address is considered valid (no validation needed) 711 * is ZERO if the address is considered valid (no validation needed)
713 * otherwise a time in the future if we're currently denying re-validation 712 * otherwise a time in the future if we're currently denying re-validation
714 * @param adress target address 713 * @param address target address
715 */ 714 */
716static void 715static void
717multicast_pong (void *cls, 716multicast_pong (void *cls,
@@ -1165,15 +1164,15 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
1165 * Based on this, the validation module will measure latency for the 1164 * Based on this, the validation module will measure latency for the
1166 * address more or less often. 1165 * address more or less often.
1167 * 1166 *
1168 * @param sender peer FIXME: redundant!
1169 * @param address the address 1167 * @param address the address
1168 * @param session the session
1170 * @param in_use GNUNET_YES if we are now using the address for a connection, 1169 * @param in_use GNUNET_YES if we are now using the address for a connection,
1171 * GNUNET_NO if we are no longer using the address for a connection 1170 * GNUNET_NO if we are no longer using the address for a connection
1172 */ 1171 */
1173void 1172void
1174GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender, 1173GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
1175 const struct GNUNET_HELLO_Address *address, 1174 struct Session *session,
1176 struct Session *session, int in_use) 1175 int in_use)
1177{ 1176{
1178 struct ValidationEntry *ve; 1177 struct ValidationEntry *ve;
1179 1178
@@ -1189,7 +1188,7 @@ GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
1189 if (ve->in_use == in_use) 1188 if (ve->in_use == in_use)
1190 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1189 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1191 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n", 1190 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n",
1192 GNUNET_i2s (sender), GST_plugins_a2s (address), ve->in_use, 1191 GNUNET_i2s (&address->peer), GST_plugins_a2s (address), ve->in_use,
1193 in_use); 1192 in_use);
1194 GNUNET_break (ve->in_use != in_use); /* should be different... */ 1193 GNUNET_break (ve->in_use != in_use); /* should be different... */
1195 ve->in_use = in_use; 1194 ve->in_use = in_use;
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index f5282d4e9..9b1063be3 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -51,15 +51,13 @@ GST_validation_stop (void);
51 * Based on this, the validation module will measure latency for the 51 * Based on this, the validation module will measure latency for the
52 * address more or less often. 52 * address more or less often.
53 * 53 *
54 * @param sender peer FIXME: redundant!
55 * @param address the address 54 * @param address the address
56 * @param session session 55 * @param session session
57 * @param in_use GNUNET_YES if we are now using the address for a connection, 56 * @param in_use GNUNET_YES if we are now using the address for a connection,
58 * GNUNET_NO if we are no longer using the address for a connection 57 * GNUNET_NO if we are no longer using the address for a connection
59 */ 58 */
60void 59void
61GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender, 60GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
62 const struct GNUNET_HELLO_Address *address,
63 struct Session *session, int in_use); 61 struct Session *session, int in_use);
64 62
65 63