Fix calculation of tcp_mss(): when timestamps are on, this is pcb->mss - 12 or else NOCOPY-apps might generate unperformant PBUF_REF chains

This commit is contained in:
goldsimon 2010-03-13 15:04:08 +00:00
parent ad4a869b94
commit 9f0b7261e5

View File

@ -320,7 +320,7 @@ void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent);
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err);
#define tcp_mss(pcb) ((pcb)->mss)
#define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss)
#define tcp_sndbuf(pcb) ((pcb)->snd_buf)
#define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen)
#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY)