diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 5 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index 0885f53e9..13a4ce830 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -290,13 +290,15 @@ find_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id, | |||
290 | GNUNET_break (0); | 290 | GNUNET_break (0); |
291 | return NULL; | 291 | return NULL; |
292 | } | 292 | } |
293 | if (0 == session_id) | ||
294 | return NULL; | ||
293 | /* Check if this session was: | 295 | /* Check if this session was: |
294 | * removed by remove_session (transport service) | 296 | * removed by remove_session (transport service) |
295 | * released by release_session (ATS) | 297 | * released by release_session (ATS) |
296 | * */ | 298 | * */ |
297 | if (sh->session_array[session_id].session == NULL) | 299 | if (sh->session_array[session_id].session == NULL) |
298 | { | 300 | { |
299 | GNUNET_assert (0 == | 301 | GNUNET_break (0 == |
300 | memcmp (peer, &sh->session_array[session_id].peer, | 302 | memcmp (peer, &sh->session_array[session_id].peer, |
301 | sizeof (struct GNUNET_PeerIdentity))); | 303 | sizeof (struct GNUNET_PeerIdentity))); |
302 | return NULL; | 304 | return NULL; |
@@ -715,6 +717,7 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, | |||
715 | size_t namelen; | 717 | size_t namelen; |
716 | size_t msize; | 718 | size_t msize; |
717 | 719 | ||
720 | GNUNET_assert (NULL != address); | ||
718 | namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1; | 721 | namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1; |
719 | msize = sizeof (struct AddressUseMessage) + address->address_length + namelen; | 722 | msize = sizeof (struct AddressUseMessage) + address->address_length + namelen; |
720 | if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 723 | if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 62fc441a1..40790dfe4 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1092,10 +1092,9 @@ send_switch_address_continuation (void *cls, | |||
1092 | { | 1092 | { |
1093 | #if DEBUG_TRANSPORT | 1093 | #if DEBUG_TRANSPORT |
1094 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1094 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1095 | "Failed to switch connected peer `%s' to plugin `%s' address '%s' session %X, asking ATS for new address \n", | 1095 | "Failed to switch connected peer `%s' to address '%s' session %X, asking ATS for new address \n", |
1096 | GNUNET_i2s (&n->id), n->address->transport_name, | 1096 | GNUNET_i2s (&n->id), |
1097 | (n->addrlen == | 1097 | GST_plugins_a2s (n->address), n->session); |
1098 | 0) ? "<inbound>" : GST_plugins_a2s (n->address), n->session); | ||
1099 | #endif | 1098 | #endif |
1100 | 1099 | ||
1101 | GNUNET_ATS_address_destroyed (GST_ats, n->address, NULL); | 1100 | GNUNET_ATS_address_destroyed (GST_ats, n->address, NULL); |
@@ -1135,9 +1134,9 @@ send_connect_ack_continuation (void *cls, | |||
1135 | /* sending failed, ask for next address */ | 1134 | /* sending failed, ask for next address */ |
1136 | #if DEBUG_TRANSPORT | 1135 | #if DEBUG_TRANSPORT |
1137 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1136 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1138 | "Failed to send CONNECT_MSG to peer `%4s' with plugin `%s' address '%s' session %X, asking ATS for new address \n", | 1137 | "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %X, asking ATS for new address \n", |
1139 | GNUNET_i2s (&n->id), n->address->transport_name, | 1138 | GNUNET_i2s (&n->id), |
1140 | (n->addrlen == 0) ? "<inbound>" : GST_plugins_a2s (n->address), | 1139 | GST_plugins_a2s (n->address), |
1141 | n->session); | 1140 | n->session); |
1142 | #endif | 1141 | #endif |
1143 | change_state (n, S_NOT_CONNECTED); | 1142 | change_state (n, S_NOT_CONNECTED); |