From 309e936ad927bc59e2449a4734c2388d475a17bf 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 9b03e75a..4f52811c 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -989,7 +989,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 /**