From 695f94576394dd4297fcd99f91166fa3b535527c Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 3 Feb 2006 21:37:47 +0000
Subject: [PATCH] Default the highwater mark to zero (autotune) when possible.
 ToDo: Check if TCP_MAXSEG actually *is* defined here ever.

---
 src/sbbs3/sbbs_ini.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/sbbs3/sbbs_ini.c b/src/sbbs3/sbbs_ini.c
index 12acaf16b9..daa737ccb6 100644
--- a/src/sbbs3/sbbs_ini.c
+++ b/src/sbbs3/sbbs_ini.c
@@ -309,7 +309,13 @@ void sbbs_read_ini(
 			=iniGetShortInt(list,section,"LastNode",4);
 
 		bbs->outbuf_highwater_mark
-			=iniGetShortInt(list,section,"OutbufHighwaterMark",1024);
+			=iniGetShortInt(list,section,"OutbufHighwaterMark"
+#ifdef TCP_MAXSEG	/* Auto-tune if possible.  Would this be defined here? */
+			,0
+#else
+			,1024
+#endif
+			);
 		bbs->outbuf_drain_timeout
 			=iniGetShortInt(list,section,"OutbufDrainTimeout",10);
 
@@ -611,7 +617,13 @@ void sbbs_read_ini(
 			=iniGetBitField(list,section,strOptions,web_options
 				,BBS_OPT_NO_HOST_LOOKUP | WEB_OPT_HTTP_LOGGING);
 		web->outbuf_highwater_mark
-			=iniGetShortInt(list,section,"OutbufHighwaterMark",1024);
+			=iniGetShortInt(list,section,"OutbufHighwaterMark"
+#ifdef TCP_MAXSEG	/* Auto-tune if possible.  Would this be defined here? */
+			,0
+#else
+			,1024
+#endif
+			);
 		web->outbuf_drain_timeout
 			=iniGetShortInt(list,section,"OutbufDrainTimeout",10);
 
-- 
GitLab