diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-26 10:58:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-26 10:58:04 +0000 |
commit | 9e84f6907b62c05755058fa521b2baea229baa3c (patch) | |
tree | 1157cfa1adaef931cf4866590aa7b9052503c8b4 /src/transport/gnunet-service-transport_neighbours.c | |
parent | 05a33ac60359d249127dc52502e8bca792383869 (diff) | |
download | gnunet-9e84f6907b62c05755058fa521b2baea229baa3c.tar.gz gnunet-9e84f6907b62c05755058fa521b2baea229baa3c.zip |
if suggested address == primary address only update quotas
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 56c5ed446..ae89cbe90 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -763,12 +763,6 @@ set_alternative_address (struct NeighbourMapEntry *n, | |||
763 | n->alternative_address.keep_alive_nonce = 0; | 763 | n->alternative_address.keep_alive_nonce = 0; |
764 | } | 764 | } |
765 | 765 | ||
766 | static void | ||
767 | set_quotas () | ||
768 | { | ||
769 | |||
770 | } | ||
771 | |||
772 | 766 | ||
773 | /** | 767 | /** |
774 | * Initialize the primary address of a neighbour | 768 | * Initialize the primary address of a neighbour |
@@ -2517,8 +2511,18 @@ switch_address_bl_check_cont (void *cls, | |||
2517 | { | 2511 | { |
2518 | if (blc_ctx->session == n->primary_address.session) | 2512 | if (blc_ctx->session == n->primary_address.session) |
2519 | { | 2513 | { |
2520 | /* Same address, update only quotas */ | 2514 | /* This address is already primary, update only quotas */ |
2521 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Update with same address!\n"); | 2515 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Update with same address!\n"); |
2516 | |||
2517 | set_primary_address (n, blc_ctx->address, blc_ctx->session, | ||
2518 | blc_ctx->bandwidth_in, blc_ctx->bandwidth_out, GNUNET_NO); | ||
2519 | |||
2520 | GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); | ||
2521 | GNUNET_HELLO_address_free(blc_ctx->address); | ||
2522 | GNUNET_free_non_null (blc_ctx->ats); | ||
2523 | GNUNET_free (blc_ctx); | ||
2524 | |||
2525 | return; | ||
2522 | } | 2526 | } |
2523 | } | 2527 | } |
2524 | 2528 | ||