diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-12-29 19:27:20 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-12-29 20:59:13 +0000 |
commit | a7846940c876fd2a76b89240aa83e7083ae9650a (patch) | |
tree | fb21f9fef7e2cebc31b85c5b1af90fc41adef002 /src | |
parent | f6a1bb920eebdba0d4a6c295c4d054307b49b2b1 (diff) |
Use single TCP segment for SMTP, TLS and TCP closes.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/smtp_in.c | 5 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b3cc76c64..439d688fd 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -3823,6 +3823,11 @@ 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)); +#endif + if (*user_msgp) smtp_respond(US"221", 3, TRUE, *user_msgp); else diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 472f7bb19..5516edfda 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -4323,6 +4323,9 @@ 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)); +#endif if (sx.send_quit) (void)smtp_write_command(&sx, SCMD_FLUSH, "QUIT\r\n"); END_OFF: |