Gitweb:
https://git.exim.org/exim.git/commitdiff/6454662ecb9e407c0616f0464c3e1f69829d14cf
Commit: 6454662ecb9e407c0616f0464c3e1f69829d14cf
Parent: 17427537cf5a55f952bad37067f0801b66bf7c08
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Jan 1 14:43:04 2021 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Fri Jan 1 14:43:04 2021 +0000
FreeBSD: packet coalescing
---
src/src/exim.h | 8 ++++++++
src/src/malware.c | 6 ------
src/src/smtp_in.c | 4 ++--
src/src/transports/smtp.c | 4 ++--
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/src/exim.h b/src/src/exim.h
index f27ed5c..bb8e4f6 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -606,5 +606,13 @@ default to EDQUOT if it exists, otherwise ENOSPC. */
# define EXIM_GROUPLIST_SIZE NGROUPS_MAX
#endif
+/* Linux has TCP_CORK, FreeBSD has TCP_NOPUSH; they do pretty much the same */
+
+#ifdef TCP_CORK
+# define EXIM_TCP_CORK TCP_CORK
+#elif defined(TCP_NOPUSH)
+# define EXIM_TCP_CORK TCP_NOPUSH
+#endif
+
#endif
/* End of exim.h */
diff --git a/src/src/malware.c b/src/src/malware.c
index a42e39a..b581a87 100644
--- a/src/src/malware.c
+++ b/src/src/malware.c
@@ -132,12 +132,6 @@ static const uschar * malware_regex_default = US ".+";
static const pcre * malware_default_re = NULL;
-#ifdef TCP_CORK
-# define EXIM_TCP_CORK TCP_CORK
-#elif defined(TCP_NOPUSH)
-# define EXIM_TCP_CORK TCP_NOPUSH
-#endif
-
#ifndef DISABLE_MAL_CLAM
/* The maximum number of clamd servers that are supported in the configuration */
# define MAX_CLAMD_SERVERS 32
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 29f6568..13cba2e 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -3819,8 +3819,8 @@ if ( acl_smtp_quit
log_write(0, LOG_MAIN|LOG_PANIC, "ACL for QUIT returned ERROR: %s",
*log_msgp);
-#ifdef TCP_CORK
-(void) setsockopt(fileno(smtp_out), IPPROTO_TCP, TCP_CORK, US &on, sizeof(on));
+#ifdef EXIM_TCP_CORK
+(void) setsockopt(fileno(smtp_out), IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));
#endif
if (*user_msgp)
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index a8ae606..8f42871 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -4393,8 +4393,8 @@ This change is being made on 31-Jul-98. After over a year of trouble-free
operation, the old commented-out code was removed on 17-Sep-99. */
SEND_QUIT:
-#ifdef TCP_CORK
-(void) setsockopt(sx->cctx.sock, IPPROTO_TCP, TCP_CORK, US &on, sizeof(on));
+#ifdef EXIM_TCP_CORK
+(void) setsockopt(sx->cctx.sock, IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));
#endif
if (sx->send_quit) (void)smtp_write_command(sx, SCMD_FLUSH, "QUIT\r\n");