The initial is actually UINT_MAX, but since this makes it hard to plot a
graph of it with autoscaling axes, show it as 0 instead. This removes the
hack where ssthresh is set to sndbuf.maxsize at the start of a connection,
which is wrong when the application overrides the send buffer size later.
}
static void debug_cwnd(struct utcp_connection *c) {
- debug(c, "snd.cwnd %u snd.ssthresh %u\n", c->snd.cwnd, c->snd.ssthresh);
+ debug(c, "snd.cwnd %u snd.ssthresh %u\n", c->snd.cwnd, ~c->snd.ssthresh ? c->snd.ssthresh : 0);
}
#else
#define debug(...) do {} while(0)
c->snd.nxt = c->snd.iss + 1;
c->snd.last = c->snd.nxt;
c->snd.cwnd = (utcp->mtu > 2190 ? 2 : utcp->mtu > 1095 ? 3 : 4) * utcp->mtu;
-#if UTCP_DEBUG
- c->snd.ssthresh = c->sndbuf.maxsize;
-#else
c->snd.ssthresh = ~0;
-#endif
debug_cwnd(c);
c->utcp = utcp;