Clear seg->oversize_left after sending OK

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Jens Nielsen 2017-09-24 15:17:00 +02:00 committed by goldsimon
parent 6cdfae1245
commit 7115384b15

View File

@ -1221,15 +1221,15 @@ tcp_output(struct tcp_pcb *pcb)
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
} }
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
err = tcp_output_segment(seg, pcb, netif); err = tcp_output_segment(seg, pcb, netif);
if (err != ERR_OK) { if (err != ERR_OK) {
/* segment could not be sent, for whatever reason */ /* segment could not be sent, for whatever reason */
tcp_set_flags(pcb, TF_NAGLEMEMERR); tcp_set_flags(pcb, TF_NAGLEMEMERR);
return err; return err;
} }
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
pcb->unsent = seg->next; pcb->unsent = seg->next;
if (pcb->state != SYN_SENT) { if (pcb->state != SYN_SENT) {
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);