fixed bug #34355: nagle does not take snd_buf/snd_queuelen into account

This commit is contained in:
Simon Goldschmidt 2011-09-22 18:50:18 +02:00
parent 0aea1b608a
commit bb5d0c5c4a
2 changed files with 6 additions and 1 deletions

View File

@ -65,6 +65,10 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2011-09-22: Simon Goldschmidt
* tcp_impl.h: fixed bug #34355: nagle does not take snd_buf/snd_queuelen into
account
2011-09-21: Simon Goldschmidt 2011-09-21: Simon Goldschmidt
* opt.h: fixed default value of TCP_SND_BUF to not violate the sanity checks * opt.h: fixed default value of TCP_SND_BUF to not violate the sanity checks
in init.c in init.c

View File

@ -85,7 +85,8 @@ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb);
#define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \ #define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \
((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \ ((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \
(((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \ (((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \
((tpcb)->unsent->len >= (tpcb)->mss))) \ ((tpcb)->unsent->len >= (tpcb)->mss))) || \
((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN)) \
) ? 1 : 0) ) ? 1 : 0)
#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK) #define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK)