aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-18 13:20:15 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-18 13:20:15 +0000
commit3ad466315e75a2de972e24ae8dbf11febd4d0738 (patch)
tree2d7740bf4a3d4619dd44e45854c1a472e0fda4d2
parent41fb4bc77ef852602063c1723366314ccbefc0a6 (diff)
downloadgnunet-3ad466315e75a2de972e24ae8dbf11febd4d0738.tar.gz
gnunet-3ad466315e75a2de972e24ae8dbf11febd4d0738.zip
-just indentation, dead code
-rw-r--r--src/transport/gnunet-service-transport.c5
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c30
2 files changed, 26 insertions, 9 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 2d2c0db46..b1cf9837b 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -1166,8 +1166,9 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1166 GST_hello_start (friend_only, &process_hello_update, NULL ); 1166 GST_hello_start (friend_only, &process_hello_update, NULL );
1167 GNUNET_assert(NULL != GST_hello_get()); 1167 GNUNET_assert(NULL != GST_hello_get());
1168 GST_blacklist_start (GST_server, GST_cfg, &GST_my_identity); 1168 GST_blacklist_start (GST_server, GST_cfg, &GST_my_identity);
1169 GST_ats = GNUNET_ATS_scheduling_init (GST_cfg, &ats_request_address_change, 1169 GST_ats = GNUNET_ATS_scheduling_init (GST_cfg,
1170 NULL ); 1170 &ats_request_address_change,
1171 NULL );
1171 GST_manipulation_init (GST_cfg); 1172 GST_manipulation_init (GST_cfg);
1172 GST_plugins_load (&GST_manipulation_recv, 1173 GST_plugins_load (&GST_manipulation_recv,
1173 &GST_neighbours_register_quota_notification, 1174 &GST_neighbours_register_quota_notification,
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 9f2f210fb..52d131e4e 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -2296,7 +2296,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target)
2296 */ 2296 */
2297int 2297int
2298GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message, 2298GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
2299 const struct GNUNET_PeerIdentity *peer) 2299 const struct GNUNET_PeerIdentity *peer)
2300{ 2300{
2301 const struct TransportSynMessage *scm; 2301 const struct TransportSynMessage *scm;
2302 struct NeighbourMapEntry *n; 2302 struct NeighbourMapEntry *n;
@@ -2417,9 +2417,22 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
2417 return GNUNET_OK; 2417 return GNUNET_OK;
2418} 2418}
2419 2419
2420
2421/**
2422 * We've been asked to switch addresses, and just now
2423 * got the result from the blacklist check to see if this
2424 * is allowed.
2425 *
2426 * @param cls the `struct BlacklistCheckSwitchContext` with
2427 * the information about the future address
2428 * @param peer the peer we may switch addresses on
2429 * @param result #GNUNET_NO if we are not allowed to use the new
2430 * address
2431 */
2420static void 2432static void
2421switch_address_bl_check_cont (void *cls, 2433switch_address_bl_check_cont (void *cls,
2422 const struct GNUNET_PeerIdentity *peer, int result) 2434 const struct GNUNET_PeerIdentity *peer,
2435 int result)
2423{ 2436{
2424 struct BlacklistCheckSwitchContext *blc_ctx = cls; 2437 struct BlacklistCheckSwitchContext *blc_ctx = cls;
2425 struct GNUNET_TRANSPORT_PluginFunctions *papi; 2438 struct GNUNET_TRANSPORT_PluginFunctions *papi;
@@ -2668,10 +2681,9 @@ switch_address_bl_check_cont (void *cls,
2668 } 2681 }
2669 2682
2670 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx); 2683 GNUNET_CONTAINER_DLL_remove (pending_bc_head, pending_bc_tail, blc_ctx);
2671 GNUNET_HELLO_address_free(blc_ctx->address); 2684 GNUNET_HELLO_address_free (blc_ctx->address);
2672 GNUNET_free_non_null (blc_ctx->ats); 2685 GNUNET_free_non_null (blc_ctx->ats);
2673 GNUNET_free (blc_ctx); 2686 GNUNET_free (blc_ctx);
2674 return;
2675} 2687}
2676 2688
2677 2689
@@ -2765,9 +2777,13 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
2765 } 2777 }
2766 } 2778 }
2767 2779
2768 GNUNET_CONTAINER_DLL_insert (pending_bc_head, pending_bc_tail, blc_ctx); 2780 GNUNET_CONTAINER_DLL_insert (pending_bc_head,
2769 if (NULL != (blc = GST_blacklist_test_allowed (peer, address->transport_name, 2781 pending_bc_tail,
2770 &switch_address_bl_check_cont, blc_ctx))) 2782 blc_ctx);
2783 if (NULL != (blc = GST_blacklist_test_allowed (peer,
2784 address->transport_name,
2785 &switch_address_bl_check_cont,
2786 blc_ctx)))
2771 { 2787 {
2772 blc_ctx->blc = blc; 2788 blc_ctx->blc = blc;
2773 } 2789 }