aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-03 14:11:03 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-03 14:11:03 +0000
commitb2e99dd91c01b5fcc16b3b1031df897aeec05eef (patch)
tree31caea8a19fd943f8a9f7f7f3c19e52e11d95a77 /src/transport/gnunet-service-transport_neighbours.c
parent55cecdea8638fa23c68e7ade7a8d5629da658f9e (diff)
downloadgnunet-b2e99dd91c01b5fcc16b3b1031df897aeec05eef.tar.gz
gnunet-b2e99dd91c01b5fcc16b3b1031df897aeec05eef.zip
separate ATS connectivity suggestions from ATS scheduling API
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index bcbc4601e..49b026e7a 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -373,7 +373,7 @@ struct NeighbourMapEntry
373 /** 373 /**
374 * ATS address suggest handle 374 * ATS address suggest handle
375 */ 375 */
376 struct GNUNET_ATS_SuggestHandle *suggest_handle; 376 struct GNUNET_ATS_ConnectivitySuggestHandle *suggest_handle;
377 377
378 /** 378 /**
379 * Time where we should cut the connection (timeout) if we don't 379 * Time where we should cut the connection (timeout) if we don't
@@ -1047,7 +1047,7 @@ free_neighbour (struct NeighbourMapEntry *n,
1047 /* Cancel address requests for this peer */ 1047 /* Cancel address requests for this peer */
1048 if (NULL != n->suggest_handle) 1048 if (NULL != n->suggest_handle)
1049 { 1049 {
1050 GNUNET_ATS_suggest_address_cancel (GST_ats, &n->id); 1050 GNUNET_ATS_connectivity_suggest_cancel (n->suggest_handle);
1051 n->suggest_handle = NULL; 1051 n->suggest_handle = NULL;
1052 } 1052 }
1053 1053
@@ -2173,8 +2173,8 @@ try_connect_bl_check_cont (void *cls,
2173 GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT)); 2173 GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT));
2174 GNUNET_ATS_reset_backoff (GST_ats, peer); 2174 GNUNET_ATS_reset_backoff (GST_ats, peer);
2175 GNUNET_assert (NULL == n->suggest_handle); 2175 GNUNET_assert (NULL == n->suggest_handle);
2176 n->suggest_handle = GNUNET_ATS_suggest_address (GST_ats, 2176 n->suggest_handle = GNUNET_ATS_connectivity_suggest (GST_ats_connect,
2177 peer); 2177 peer);
2178} 2178}
2179 2179
2180 2180
@@ -2321,7 +2321,8 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
2321 set_state_and_timeout (n, GNUNET_TRANSPORT_PS_SYN_RECV_ATS, 2321 set_state_and_timeout (n, GNUNET_TRANSPORT_PS_SYN_RECV_ATS,
2322 GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT)); 2322 GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT));
2323 if (NULL == n->suggest_handle) 2323 if (NULL == n->suggest_handle)
2324 n->suggest_handle = GNUNET_ATS_suggest_address (GST_ats, peer); 2324 n->suggest_handle = GNUNET_ATS_connectivity_suggest (GST_ats_connect,
2325 peer);
2325 break; 2326 break;
2326 case GNUNET_TRANSPORT_PS_INIT_ATS: 2327 case GNUNET_TRANSPORT_PS_INIT_ATS:
2327 /* SYN message takes priority over us asking ATS for address: 2328 /* SYN message takes priority over us asking ATS for address:
@@ -2375,7 +2376,8 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
2375 n->ack_state = ACK_SEND_SYN_ACK; 2376 n->ack_state = ACK_SEND_SYN_ACK;
2376 n->connect_ack_timestamp = ts; 2377 n->connect_ack_timestamp = ts;
2377 /* Request an address for the peer */ 2378 /* Request an address for the peer */
2378 n->suggest_handle = GNUNET_ATS_suggest_address (GST_ats, peer); 2379 n->suggest_handle = GNUNET_ATS_connectivity_suggest (GST_ats_connect,
2380 peer);
2379 GNUNET_ATS_reset_backoff (GST_ats, peer); 2381 GNUNET_ATS_reset_backoff (GST_ats, peer);
2380 set_state (n, GNUNET_TRANSPORT_PS_SYN_RECV_ATS); 2382 set_state (n, GNUNET_TRANSPORT_PS_SYN_RECV_ATS);
2381 break; 2383 break;