diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-18 15:33:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-18 15:33:04 +0000 |
commit | 0b3b2d6ba834046a88f64aa65b27ff57d382dce9 (patch) | |
tree | cc82c144fe5a804315b10f6ed7f13d837252ee52 /src/transport/gnunet-service-transport_neighbours.c | |
parent | 5f48d602887285cff6c14358a1d1c6f004a68510 (diff) | |
download | gnunet-0b3b2d6ba834046a88f64aa65b27ff57d382dce9.tar.gz gnunet-0b3b2d6ba834046a88f64aa65b27ff57d382dce9.zip |
- fixing assertion in scheduling_api.c:1222
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index c6281f1ba..7e1ae8689 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -2015,6 +2015,7 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message, | |||
2015 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2015 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2016 | "Received CONNECT message from peer `%s'\n", | 2016 | "Received CONNECT message from peer `%s'\n", |
2017 | GNUNET_i2s (peer)); | 2017 | GNUNET_i2s (peer)); |
2018 | |||
2018 | if (ntohs (message->size) != sizeof (struct SessionConnectMessage)) | 2019 | if (ntohs (message->size) != sizeof (struct SessionConnectMessage)) |
2019 | { | 2020 | { |
2020 | GNUNET_break_op (0); | 2021 | GNUNET_break_op (0); |
@@ -2030,6 +2031,7 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message, | |||
2030 | n = setup_neighbour (peer); | 2031 | n = setup_neighbour (peer); |
2031 | n->send_connect_ack = 1; | 2032 | n->send_connect_ack = 1; |
2032 | n->connect_ack_timestamp = ts; | 2033 | n->connect_ack_timestamp = ts; |
2034 | |||
2033 | switch (n->state) | 2035 | switch (n->state) |
2034 | { | 2036 | { |
2035 | case S_NOT_CONNECTED: | 2037 | case S_NOT_CONNECTED: |
@@ -2143,8 +2145,21 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
2143 | GNUNET_ATS_address_destroyed (GST_ats, address, NULL); | 2145 | GNUNET_ATS_address_destroyed (GST_ats, address, NULL); |
2144 | return; | 2146 | return; |
2145 | } | 2147 | } |
2148 | |||
2149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2150 | "ATS tells us to switch to address '%s' session %p for peer `%s' in state %s\n", | ||
2151 | (address->address_length != 0) ? GST_plugins_a2s (address): "<inbound>", | ||
2152 | session, | ||
2153 | GNUNET_i2s (peer), | ||
2154 | print_state (n->state)); | ||
2155 | |||
2146 | if (NULL == session) | 2156 | if (NULL == session) |
2157 | { | ||
2147 | session = papi->get_session (papi->cls, address); | 2158 | session = papi->get_session (papi->cls, address); |
2159 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2160 | "Obtained new session for peer `%s' and address '%s': %p\n", | ||
2161 | GNUNET_i2s (&address->peer), GST_plugins_a2s (address), session); | ||
2162 | } | ||
2148 | if (NULL == session) | 2163 | if (NULL == session) |
2149 | { | 2164 | { |
2150 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2165 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -2153,12 +2168,6 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
2153 | GNUNET_ATS_address_destroyed (GST_ats, address, NULL); | 2168 | GNUNET_ATS_address_destroyed (GST_ats, address, NULL); |
2154 | return; | 2169 | return; |
2155 | } | 2170 | } |
2156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2157 | "ATS tells us to switch to address '%s' session %p for peer `%s'\n", | ||
2158 | (address->address_length != 0) ? GST_plugins_a2s (address): "<inbound>", | ||
2159 | session, | ||
2160 | GNUNET_i2s (peer)); | ||
2161 | |||
2162 | switch (n->state) | 2171 | switch (n->state) |
2163 | { | 2172 | { |
2164 | case S_NOT_CONNECTED: | 2173 | case S_NOT_CONNECTED: |
@@ -2564,6 +2573,7 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message, | |||
2564 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2565 | "Received CONNECT_ACK message from peer `%s'\n", | 2574 | "Received CONNECT_ACK message from peer `%s'\n", |
2566 | GNUNET_i2s (peer)); | 2575 | GNUNET_i2s (peer)); |
2576 | |||
2567 | if (ntohs (message->size) != sizeof (struct SessionConnectMessage)) | 2577 | if (ntohs (message->size) != sizeof (struct SessionConnectMessage)) |
2568 | { | 2578 | { |
2569 | GNUNET_break_op (0); | 2579 | GNUNET_break_op (0); |