diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-17 15:27:09 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-17 15:27:09 +0000 |
commit | 716af5857b059047ddeca165307c9d197f82292d (patch) | |
tree | 1f5660025b2c2f27e3fb4db5a5a4e0fa87b040f8 /src | |
parent | 0c9390eeb0ddeadc18fc2fd139554b128e3ee03d (diff) | |
download | gnunet-716af5857b059047ddeca165307c9d197f82292d.tar.gz gnunet-716af5857b059047ddeca165307c9d197f82292d.zip |
no set_state to DISCONNECT_FINISHED required before free_neighbour
fixing log output
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/gnunet-service-transport_clients.c | 4 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 21 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index b695ca416..10da37088 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -809,8 +809,8 @@ clients_handle_request_connect (void *cls, struct GNUNET_SERVER_Client *client, | |||
809 | } | 809 | } |
810 | else | 810 | else |
811 | { | 811 | { |
812 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 812 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
813 | "Received a request connect message for peer `%s'\n", | 813 | _("Received a request connect message for peer `%s'\n"), |
814 | GNUNET_i2s (&trcm->peer)); | 814 | GNUNET_i2s (&trcm->peer)); |
815 | 815 | ||
816 | (void) GST_blacklist_test_allowed (&trcm->peer, NULL, &try_connect_if_allowed, | 816 | (void) GST_blacklist_test_allowed (&trcm->peer, NULL, &try_connect_if_allowed, |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index c88b9248f..db2adccab 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -832,7 +832,7 @@ free_neighbour (struct NeighbourMapEntry *n, | |||
832 | struct GNUNET_HELLO_Address *backup_primary; | 832 | struct GNUNET_HELLO_Address *backup_primary; |
833 | 833 | ||
834 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 834 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
835 | "Freeing neighbur state of peer `%s'\n", | 835 | "Freeing neighbour state of peer `%s'\n", |
836 | GNUNET_i2s (&n->id)); | 836 | GNUNET_i2s (&n->id)); |
837 | n->is_active = NULL; /* always free'd by its own continuation! */ | 837 | n->is_active = NULL; /* always free'd by its own continuation! */ |
838 | 838 | ||
@@ -854,6 +854,7 @@ free_neighbour (struct NeighbourMapEntry *n, | |||
854 | GNUNET_NO); | 854 | GNUNET_NO); |
855 | disconnect_notify_cb (callback_cls, &n->id); | 855 | disconnect_notify_cb (callback_cls, &n->id); |
856 | } | 856 | } |
857 | /* Mark peer as disconnected */ | ||
857 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | 858 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); |
858 | 859 | ||
859 | if (NULL != n->primary_address.address) | 860 | if (NULL != n->primary_address.address) |
@@ -2504,7 +2505,7 @@ switch_address_bl_check_cont (void *cls, | |||
2504 | if (result == GNUNET_NO) | 2505 | if (result == GNUNET_NO) |
2505 | { | 2506 | { |
2506 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2507 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2507 | "Blacklist denied to switch to suggested address `%s' sesion %p for peer `%s'\n", | 2508 | "Blacklist denied to switch to suggested address `%s' session %p for peer `%s'\n", |
2508 | GST_plugins_a2s (blc_ctx->address), | 2509 | GST_plugins_a2s (blc_ctx->address), |
2509 | blc_ctx->session, | 2510 | blc_ctx->session, |
2510 | GNUNET_i2s (&blc_ctx->address->peer)); | 2511 | GNUNET_i2s (&blc_ctx->address->peer)); |
@@ -2519,8 +2520,8 @@ switch_address_bl_check_cont (void *cls, | |||
2519 | return; | 2520 | return; |
2520 | } | 2521 | } |
2521 | 2522 | ||
2522 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2523 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
2523 | "Blacklist accepted to switch to suggested address `%s' for peer `%s'\n", | 2524 | "Blacklist accepted to switch to suggested address `%s' session %p for peer `%s'\n", |
2524 | GST_plugins_a2s (blc_ctx->address), | 2525 | GST_plugins_a2s (blc_ctx->address), |
2525 | blc_ctx->session, | 2526 | blc_ctx->session, |
2526 | GNUNET_i2s (&blc_ctx->address->peer)); | 2527 | GNUNET_i2s (&blc_ctx->address->peer)); |
@@ -2536,7 +2537,8 @@ switch_address_bl_check_cont (void *cls, | |||
2536 | { | 2537 | { |
2537 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2538 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2538 | "Failed to obtain new session for peer `%s' and address '%s'\n", | 2539 | "Failed to obtain new session for peer `%s' and address '%s'\n", |
2539 | GNUNET_i2s (&blc_ctx->address->peer), GST_plugins_a2s (blc_ctx->address)); | 2540 | GNUNET_i2s (&blc_ctx->address->peer), |
2541 | GST_plugins_a2s (blc_ctx->address)); | ||
2540 | GNUNET_ATS_address_destroyed (GST_ats, blc_ctx->address, NULL); | 2542 | GNUNET_ATS_address_destroyed (GST_ats, blc_ctx->address, NULL); |
2541 | return; | 2543 | return; |
2542 | } | 2544 | } |
@@ -2949,7 +2951,7 @@ master_task (void *cls, | |||
2949 | 2951 | ||
2950 | n->task = GNUNET_SCHEDULER_NO_TASK; | 2952 | n->task = GNUNET_SCHEDULER_NO_TASK; |
2951 | delay = GNUNET_TIME_absolute_get_remaining (n->timeout); | 2953 | delay = GNUNET_TIME_absolute_get_remaining (n->timeout); |
2952 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2954 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
2953 | "Master task runs for neighbour `%s' in state %s with timeout in %s\n", | 2955 | "Master task runs for neighbour `%s' in state %s with timeout in %s\n", |
2954 | GNUNET_i2s (&n->id), | 2956 | GNUNET_i2s (&n->id), |
2955 | GNUNET_TRANSPORT_ps2s(n->state), | 2957 | GNUNET_TRANSPORT_ps2s(n->state), |
@@ -2960,7 +2962,6 @@ master_task (void *cls, | |||
2960 | case GNUNET_TRANSPORT_PS_NOT_CONNECTED: | 2962 | case GNUNET_TRANSPORT_PS_NOT_CONNECTED: |
2961 | /* invalid state for master task, clean up */ | 2963 | /* invalid state for master task, clean up */ |
2962 | GNUNET_break (0); | 2964 | GNUNET_break (0); |
2963 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
2964 | free_neighbour (n, GNUNET_NO); | 2965 | free_neighbour (n, GNUNET_NO); |
2965 | return; | 2966 | return; |
2966 | case GNUNET_TRANSPORT_PS_INIT_ATS: | 2967 | case GNUNET_TRANSPORT_PS_INIT_ATS: |
@@ -2969,7 +2970,6 @@ master_task (void *cls, | |||
2969 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 2970 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
2970 | "Connection to `%s' timed out waiting for ATS to provide address\n", | 2971 | "Connection to `%s' timed out waiting for ATS to provide address\n", |
2971 | GNUNET_i2s (&n->id)); | 2972 | GNUNET_i2s (&n->id)); |
2972 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
2973 | free_neighbour (n, GNUNET_NO); | 2973 | free_neighbour (n, GNUNET_NO); |
2974 | return; | 2974 | return; |
2975 | } | 2975 | } |
@@ -2980,7 +2980,6 @@ master_task (void *cls, | |||
2980 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2980 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2981 | "Connection to `%s' timed out waiting for BLACKLIST to approve address\n", | 2981 | "Connection to `%s' timed out waiting for BLACKLIST to approve address\n", |
2982 | GNUNET_i2s (&n->id)); | 2982 | GNUNET_i2s (&n->id)); |
2983 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
2984 | free_neighbour (n, GNUNET_NO); | 2983 | free_neighbour (n, GNUNET_NO); |
2985 | return; | 2984 | return; |
2986 | } | 2985 | } |
@@ -3007,7 +3006,6 @@ master_task (void *cls, | |||
3007 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3006 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3008 | "Connection to `%s' timed out waiting BLACKLIST to approve address to use for received CONNECT\n", | 3007 | "Connection to `%s' timed out waiting BLACKLIST to approve address to use for received CONNECT\n", |
3009 | GNUNET_i2s (&n->id)); | 3008 | GNUNET_i2s (&n->id)); |
3010 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
3011 | free_neighbour (n, GNUNET_NO); | 3009 | free_neighbour (n, GNUNET_NO); |
3012 | return; | 3010 | return; |
3013 | } | 3011 | } |
@@ -3018,7 +3016,6 @@ master_task (void *cls, | |||
3018 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3016 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3019 | "Connection to `%s' timed out waiting ATS to provide address to use for CONNECT_ACK\n", | 3017 | "Connection to `%s' timed out waiting ATS to provide address to use for CONNECT_ACK\n", |
3020 | GNUNET_i2s (&n->id)); | 3018 | GNUNET_i2s (&n->id)); |
3021 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
3022 | free_neighbour (n, GNUNET_NO); | 3019 | free_neighbour (n, GNUNET_NO); |
3023 | return; | 3020 | return; |
3024 | } | 3021 | } |
@@ -3029,7 +3026,6 @@ master_task (void *cls, | |||
3029 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3026 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3030 | "Connection to `%s' timed out waiting BLACKLIST to approve address to use for CONNECT_ACK\n", | 3027 | "Connection to `%s' timed out waiting BLACKLIST to approve address to use for CONNECT_ACK\n", |
3031 | GNUNET_i2s (&n->id)); | 3028 | GNUNET_i2s (&n->id)); |
3032 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
3033 | free_neighbour (n, GNUNET_NO); | 3029 | free_neighbour (n, GNUNET_NO); |
3034 | return; | 3030 | return; |
3035 | } | 3031 | } |
@@ -3852,7 +3848,6 @@ disconnect_all_neighbours (void *cls, | |||
3852 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3848 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3853 | "Disconnecting peer `%4s', %s\n", | 3849 | "Disconnecting peer `%4s', %s\n", |
3854 | GNUNET_i2s (&n->id), "SHUTDOWN_TASK"); | 3850 | GNUNET_i2s (&n->id), "SHUTDOWN_TASK"); |
3855 | set_state (n, GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED); | ||
3856 | free_neighbour (n, GNUNET_NO); | 3851 | free_neighbour (n, GNUNET_NO); |
3857 | return GNUNET_OK; | 3852 | return GNUNET_OK; |
3858 | } | 3853 | } |