From 77f0305ef0099efa6b6422d46b3c7bb4f8250526 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 19 Oct 2011 12:55:32 +0200 Subject: [PATCH] Fix default value of TCP_SNDLOWAT for small values of TCP_SND_BUF (broken with my 2nd-last commit) --- src/include/lwip/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 48581e5a..119e3252 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -978,7 +978,7 @@ * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). */ #ifndef TCP_SNDLOWAT -#define TCP_SNDLOWAT LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1) +#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) #endif /**