summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-09 04:17:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-09 04:17:11 +0000
commitab521a11a1e994e99a043d3622c9692c04299bbd (patch)
tree7c9391d41d2a7401da401ec1af91f5634591712a
parent8c62b28e0ef1e012ebb0713701916d82ffc7661e (diff)
downloadsamba-ab521a11a1e994e99a043d3622c9692c04299bbd.tar.gz
samba-ab521a11a1e994e99a043d3622c9692c04299bbd.tar.bz2
samba-ab521a11a1e994e99a043d3622c9692c04299bbd.zip
I talked to Dave Miller and he thinks that we should have TCP_NODELAY
on by default on OSes that support it, given the network IO pattern that Samba uses. He doesn't think it will cause problems. (This used to be commit 15016aa024854ca56ef20d1f29f54f9698a1911b)
-rw-r--r--source3/include/local.h8
-rw-r--r--source3/param/loadparm.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index 85e61c63c4..c609f65342 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -173,6 +173,14 @@
#define LONG_CONNECT_TIMEOUT 30
#define SHORT_CONNECT_TIMEOUT 5
+/* default socket options. Dave Miller thinks we should default to TCP_NODELAY
+ given the socket IO pattern that Samba uses*/
+#ifdef TCP_NODELAY
+#define DEFAULT_SOCKET_OPTIONS "TCP_NODELAY"
+#else
+#define DEFAULT_SOCKET_OPTIONS ""
+#endif
+
/* the default netbios keepalive timeout */
#define DEFAULT_KEEPALIVE 300
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index fcdc2ae68d..74f8df6cb7 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -804,6 +804,8 @@ static void init_globals(void)
slprintf(s,sizeof(s)-1, "%d.%d", DEFAULT_MAJOR_VERSION, DEFAULT_MINOR_VERSION);
string_set(&Globals.szAnnounceVersion,s);
+ pstrcpy(user_socket_options, DEFAULT_SOCKET_OPTIONS);
+
string_set(&Globals.szLogonDrive, "");
/* %N is the NIS auto.home server if -DAUTOHOME is used, else same as %L */
string_set(&Globals.szLogonHome, "\\\\%N\\%U");