GNUNET_break (0);
return NULL;
}
+ if (0 == session_id)
+ return NULL;
/* Check if this session was:
* removed by remove_session (transport service)
* released by release_session (ATS)
* */
if (sh->session_array[session_id].session == NULL)
{
- GNUNET_assert (0 ==
+ GNUNET_break (0 ==
memcmp (peer, &sh->session_array[session_id].peer,
sizeof (struct GNUNET_PeerIdentity)));
return NULL;
size_t namelen;
size_t msize;
+ GNUNET_assert (NULL != address);
namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1;
msize = sizeof (struct AddressUseMessage) + address->address_length + namelen;
if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
{
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Failed to switch connected peer `%s' to plugin `%s' address '%s' session %X, asking ATS for new address \n",
- GNUNET_i2s (&n->id), n->address->transport_name,
- (n->addrlen ==
- 0) ? "<inbound>" : GST_plugins_a2s (n->address), n->session);
+ "Failed to switch connected peer `%s' to address '%s' session %X, asking ATS for new address \n",
+ GNUNET_i2s (&n->id),
+ GST_plugins_a2s (n->address), n->session);
#endif
GNUNET_ATS_address_destroyed (GST_ats, n->address, NULL);
/* sending failed, ask for next address */
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Failed to send CONNECT_MSG to peer `%4s' with plugin `%s' address '%s' session %X, asking ATS for new address \n",
- GNUNET_i2s (&n->id), n->address->transport_name,
- (n->addrlen == 0) ? "<inbound>" : GST_plugins_a2s (n->address),
+ "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %X, asking ATS for new address \n",
+ GNUNET_i2s (&n->id),
+ GST_plugins_a2s (n->address),
n->session);
#endif
change_state (n, S_NOT_CONNECTED);