gettext_noop
("# transmission failures for messages to other peers"),
1, GNUNET_NO);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending message to `%s' of type %u with %u bytes was a %s\n",
GNUNET_i2s (receiver),
ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type),
GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq);
n->is_active = mq;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Giving message with %u bytes to plugin session %p\n",
mq->message_buf_size, n->primary_address.session);
mq->message_buf_size = msg_size;
mq->timeout = GNUNET_TIME_relative_to_absolute (timeout);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Enqueueing %u bytes to send to peer %s\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Enqueueing %u bytes to send to peer %s\n",
msg_size, GNUNET_i2s (target));
GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, mq);
GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT));
break;
default:
- GNUNET_break(0);
disconnect_neighbour (n);
break;
}
GNUNET_TIME_relative_to_absolute (ATS_RESPONSE_TIMEOUT));
break;
default:
- GNUNET_break (0);
disconnect_neighbour (n);
break;
}
n->ack_state = ACK_SEND_CONNECT_ACK;
n->connect_ack_timestamp = ts;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received CONNECT for peer `%s' in state %s/%s\n",
GNUNET_i2s (peer),
GNUNET_TRANSPORT_ps2s (n->state),
set_primary_address (n, n->alternative_address.address,
n->alternative_address.session, n->alternative_address.bandwidth_in,
n->alternative_address.bandwidth_out, GNUNET_YES);
-
GNUNET_STATISTICS_update (GST_stats, gettext_noop
("# Successful attempts to switch addresses"), 1, GNUNET_NO);
{
struct NeighbourMapEntry *n;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received SESSION_ACK message from peer `%s'\n",
GNUNET_i2s (peer));
if (ntohs (message->size) != sizeof (struct GNUNET_MessageHeader))
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Received %s for peer `%s' in state %s/%s\n",
+ "SESSION_ACK",
+ GNUNET_i2s (peer),
+ GNUNET_TRANSPORT_ps2s (n->state),
+ print_ack_state (n->ack_state));
+
/* Check if we are in a plausible state for having sent
a CONNECT_ACK. If not, return, otherwise break.
GNUNET_NO);
}
+ if (GNUNET_TRANSPORT_PS_CONNECTED_SWITCHING_CONNECT_SENT == n->state)
+ {
+ /* We tried to switch addresses while being connect. We explicitly wait
+ * for a CONNECT_ACK before going to GNUNET_TRANSPORT_PS_CONNECTED,
+ * so we do not want to set the address as in use! */
+ return GNUNET_OK;
+ }
+
set_state_and_timeout (n, GNUNET_TRANSPORT_PS_CONNECTED,
- GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT));
+ GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT));
/* Add session to ATS since no session was given (NULL) and we may have
* obtained a new session */