aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-18 13:22:12 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-18 13:22:12 +0000
commit564e4a46044821e3881777bd7d373c8c209ef890 (patch)
tree663cbee25367940e3caa2fc345ba4a7bbddd138b /src/transport/gnunet-service-transport_neighbours.c
parent3ad466315e75a2de972e24ae8dbf11febd4d0738 (diff)
downloadgnunet-564e4a46044821e3881777bd7d373c8c209ef890.tar.gz
gnunet-564e4a46044821e3881777bd7d373c8c209ef890.zip
removing dead logic to copy and pass around unused ATS values
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 52d131e4e..748d88f1f 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -2154,8 +2154,6 @@ struct BlacklistCheckSwitchContext
2154 2154
2155 struct GNUNET_HELLO_Address *address; 2155 struct GNUNET_HELLO_Address *address;
2156 struct Session *session; 2156 struct Session *session;
2157 struct GNUNET_ATS_Information *ats;
2158 uint32_t ats_count;
2159 2157
2160 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; 2158 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
2161 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; 2159 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
@@ -2480,7 +2478,6 @@ switch_address_bl_check_cont (void *cls,
2480 /* Remove blacklist check and clean up */ 2478 /* Remove blacklist check and clean up */
2481 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); 2479 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx);
2482 GNUNET_HELLO_address_free (blc_ctx->address); 2480 GNUNET_HELLO_address_free (blc_ctx->address);
2483 GNUNET_free_non_null (blc_ctx->ats);
2484 GNUNET_free (blc_ctx); 2481 GNUNET_free (blc_ctx);
2485 return; 2482 return;
2486 } 2483 }
@@ -2504,7 +2501,6 @@ switch_address_bl_check_cont (void *cls,
2504 2501
2505 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); 2502 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx);
2506 GNUNET_HELLO_address_free (blc_ctx->address); 2503 GNUNET_HELLO_address_free (blc_ctx->address);
2507 GNUNET_free_non_null (blc_ctx->ats);
2508 GNUNET_free (blc_ctx); 2504 GNUNET_free (blc_ctx);
2509 return; 2505 return;
2510 } 2506 }
@@ -2526,9 +2522,7 @@ switch_address_bl_check_cont (void *cls,
2526 2522
2527 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); 2523 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx);
2528 GNUNET_HELLO_address_free(blc_ctx->address); 2524 GNUNET_HELLO_address_free(blc_ctx->address);
2529 GNUNET_free_non_null (blc_ctx->ats);
2530 GNUNET_free (blc_ctx); 2525 GNUNET_free (blc_ctx);
2531
2532 return; 2526 return;
2533 } 2527 }
2534 } 2528 }
@@ -2682,7 +2676,6 @@ switch_address_bl_check_cont (void *cls,
2682 2676
2683 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); 2677 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx);
2684 GNUNET_HELLO_address_free (blc_ctx->address); 2678 GNUNET_HELLO_address_free (blc_ctx->address);
2685 GNUNET_free_non_null (blc_ctx->ats);
2686 GNUNET_free (blc_ctx); 2679 GNUNET_free (blc_ctx);
2687} 2680}
2688 2681
@@ -2696,8 +2689,6 @@ switch_address_bl_check_cont (void *cls,
2696 * @param peer identity of the peer to switch the address for 2689 * @param peer identity of the peer to switch the address for
2697 * @param address address of the other peer, 2690 * @param address address of the other peer,
2698 * @param session session to use or NULL if transport should initiate a session 2691 * @param session session to use or NULL if transport should initiate a session
2699 * @param ats performance data
2700 * @param ats_count number of entries in ats
2701 * @param bandwidth_in inbound quota to be used when connection is up, 2692 * @param bandwidth_in inbound quota to be used when connection is up,
2702 * 0 to disconnect from peer 2693 * 0 to disconnect from peer
2703 * @param bandwidth_out outbound quota to be used when connection is up, 2694 * @param bandwidth_out outbound quota to be used when connection is up,
@@ -2707,15 +2698,12 @@ void
2707GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, 2698GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
2708 const struct GNUNET_HELLO_Address *address, 2699 const struct GNUNET_HELLO_Address *address,
2709 struct Session *session, 2700 struct Session *session,
2710 const struct GNUNET_ATS_Information *ats,
2711 uint32_t ats_count,
2712 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 2701 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
2713 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 2702 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
2714{ 2703{
2715 struct NeighbourMapEntry *n; 2704 struct NeighbourMapEntry *n;
2716 struct GST_BlacklistCheck *blc; 2705 struct GST_BlacklistCheck *blc;
2717 struct BlacklistCheckSwitchContext *blc_ctx; 2706 struct BlacklistCheckSwitchContext *blc_ctx;
2718 int c;
2719 2707
2720 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2708 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2721 "ATS has decided on an address for peer %s\n", 2709 "ATS has decided on an address for peer %s\n",
@@ -2765,18 +2753,6 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
2765 blc_ctx->session = session; 2753 blc_ctx->session = session;
2766 blc_ctx->bandwidth_in = bandwidth_in; 2754 blc_ctx->bandwidth_in = bandwidth_in;
2767 blc_ctx->bandwidth_out = bandwidth_out; 2755 blc_ctx->bandwidth_out = bandwidth_out;
2768 blc_ctx->ats_count = ats_count;
2769 blc_ctx->ats = NULL;
2770 if (ats_count > 0)
2771 {
2772 blc_ctx->ats = GNUNET_malloc (ats_count * sizeof (struct GNUNET_ATS_Information));
2773 for (c = 0; c < ats_count; c++)
2774 {
2775 blc_ctx->ats[c].type = ats[c].type;
2776 blc_ctx->ats[c].value = ats[c].value;
2777 }
2778 }
2779
2780 GNUNET_CONTAINER_DLL_insert (pending_bc_head, 2756 GNUNET_CONTAINER_DLL_insert (pending_bc_head,
2781 pending_bc_tail, 2757 pending_bc_tail,
2782 blc_ctx); 2758 blc_ctx);
@@ -3907,7 +3883,6 @@ GST_neighbours_stop ()
3907 } 3883 }
3908 if (NULL != cur->address) 3884 if (NULL != cur->address)
3909 GNUNET_HELLO_address_free (cur->address); 3885 GNUNET_HELLO_address_free (cur->address);
3910 GNUNET_free_non_null (cur->ats);
3911 GNUNET_free (cur); 3886 GNUNET_free (cur);
3912 } 3887 }
3913 3888