GNUNET_assert (NULL != ch->last_control_qe);
ch->last_control_qe = NULL;
ch->retry_time = GNUNET_TIME_STD_BACKOFF (ch->retry_time);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sent CHANNEL_OPEN on %s, retrying in %s\n",
+ GCCH_2s (ch),
+ GNUNET_STRINGS_relative_time_to_string (ch->retry_time,
+ GNUNET_YES));
ch->retry_control_task
= GNUNET_SCHEDULER_add_delayed (ch->retry_time,
&send_channel_open,
GCCH_tunnel_up (struct CadetChannel *ch)
{
GNUNET_assert (NULL == ch->retry_control_task);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Tunnel up, sending CHANNEL_OPEN on %s now\n",
+ GCCH_2s (ch));
ch->retry_control_task
= GNUNET_SCHEDULER_add_now (&send_channel_open,
ch);
GCCH_2s (ch));
return;
}
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Retransmitting OPEN_ACK on channel %s\n",
+ GCCH_2s (ch));
ch->retry_control_task
= GNUNET_SCHEDULER_add_now (&send_open_ack,
ch);
void
GCCH_channel_local_destroy (struct CadetChannel *ch)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Local client asks for destruction of %s which it initiated\n",
+ GCCH_2s (ch));
if (GNUNET_YES == ch->destroy)
{
/* other end already destroyed, with the local client gone, no need
void
GCCH_channel_incoming_destroy (struct CadetChannel *ch)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Local client asks for destruction of %s which it accepted\n",
+ GCCH_2s (ch));
if (GNUNET_YES == ch->destroy)
{
/* other end already destroyed, with the remote client gone, no need
{
/* ACK for message we already dropped, might have been a
duplicate ACK? Ignore. */
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Duplicate DATA_ACK on %s, ignoring\n",
+ GCCH_2s (ch));
GNUNET_STATISTICS_update (stats,
"# duplicate DATA_ACKs",
1,
ch->pending_messages--;
GNUNET_free (crm);
GNUNET_assert (ch->pending_messages < ch->max_pending_messages);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Received DATA_ACK on %s for message %u (%u ACKs pending)\n",
+ GCCH_2s (ch),
+ (unsigned int) ntohl (ack->mid.mid),
+ ch->pending_messages);
send_ack_to_client (ch,
(NULL == ch->owner) ? ch->dest : ch->owner);
}
{
/**
* Which number does this channel have that uniquely identfies
- * it within its tunnel?
+ * it within its tunnel, in network byte order.
+ *
+ * Given two peers, both may initiate channels over the same tunnel.
+ * The @e cn must be greater or equal to 0x80000000 (high-bit set)
+ * for tunnels initiated with the peer that has the larger peer
+ * identity as compared using #GNUNET_CRYPTO_cmp_peer_identity().
*/
uint32_t cn GNUNET_PACKED;
};