diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-18 17:31:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-18 17:31:14 +0000 |
commit | bb720291e7a5a71e9139865f97025bfa179cd3a3 (patch) | |
tree | 09d1184ae8155aa7906a6823e4b9b432a4bfb7ec /src/transport/gnunet-service-transport_neighbours.c | |
parent | c5f60b28bfafd0b8196eb110e7cb3a8a1b12aa0f (diff) | |
download | gnunet-bb720291e7a5a71e9139865f97025bfa179cd3a3.tar.gz gnunet-bb720291e7a5a71e9139865f97025bfa179cd3a3.zip |
-remarking on things to fix
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 748d88f1f..1bf1fd754 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -3161,6 +3161,8 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag | |||
3161 | n->primary_address.bandwidth_in, | 3161 | n->primary_address.bandwidth_in, |
3162 | n->primary_address.bandwidth_out); | 3162 | n->primary_address.bandwidth_out); |
3163 | /* Tell ATS that the outbound session we created to send SYN was successful */ | 3163 | /* Tell ATS that the outbound session we created to send SYN was successful */ |
3164 | // FIXME: shouldn't ATS already know about *outbound* sessions | ||
3165 | // in particular? | ||
3164 | GST_ats_add_address (n->primary_address.address, | 3166 | GST_ats_add_address (n->primary_address.address, |
3165 | n->primary_address.session, | 3167 | n->primary_address.session, |
3166 | NULL, 0); | 3168 | NULL, 0); |
@@ -3204,6 +3206,7 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag | |||
3204 | GNUNET_break (GNUNET_NO == n->alternative_address.ats_active); | 3206 | GNUNET_break (GNUNET_NO == n->alternative_address.ats_active); |
3205 | 3207 | ||
3206 | /* Notify about session... perhaps we obtained it */ | 3208 | /* Notify about session... perhaps we obtained it */ |
3209 | // FIXME: why is this needed? | ||
3207 | GST_ats_add_address (n->alternative_address.address, | 3210 | GST_ats_add_address (n->alternative_address.address, |
3208 | n->alternative_address.session, NULL, 0); | 3211 | n->alternative_address.session, NULL, 0); |
3209 | /* Set primary addresses */ | 3212 | /* Set primary addresses */ |
@@ -3444,8 +3447,8 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, | |||
3444 | now wait for the ACK to finally be connected | 3447 | now wait for the ACK to finally be connected |
3445 | - If we sent a SYN_ACK to this peer before */ | 3448 | - If we sent a SYN_ACK to this peer before */ |
3446 | 3449 | ||
3447 | if ( (GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) && | 3450 | if ( (GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) && |
3448 | (ACK_SEND_ACK != n->ack_state)) | 3451 | (ACK_SEND_ACK != n->ack_state)) |
3449 | { | 3452 | { |
3450 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3453 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
3451 | "Received unexpected ACK message from peer `%s' in state %s/%s\n", | 3454 | "Received unexpected ACK message from peer `%s' in state %s/%s\n", |
@@ -3486,8 +3489,10 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, | |||
3486 | 3489 | ||
3487 | /* Add session to ATS since no session was given (NULL) and we may have | 3490 | /* Add session to ATS since no session was given (NULL) and we may have |
3488 | * obtained a new session */ | 3491 | * obtained a new session */ |
3489 | GST_ats_add_address (n->primary_address.address, n->primary_address.session, | 3492 | // FIXME: likely not the best place to do this... |
3490 | NULL, 0); | 3493 | GST_ats_add_address (n->primary_address.address, |
3494 | n->primary_address.session, | ||
3495 | NULL, 0); | ||
3491 | 3496 | ||
3492 | /* Set primary address to used */ | 3497 | /* Set primary address to used */ |
3493 | set_primary_address (n, | 3498 | set_primary_address (n, |
@@ -3512,6 +3517,7 @@ GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target) | |||
3512 | return test_connected (lookup_neighbour (target)); | 3517 | return test_connected (lookup_neighbour (target)); |
3513 | } | 3518 | } |
3514 | 3519 | ||
3520 | |||
3515 | /** | 3521 | /** |
3516 | * Change the incoming quota for the given peer. | 3522 | * Change the incoming quota for the given peer. |
3517 | * | 3523 | * |