]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9-20110125
authorWietse Venema <wietse@porcupine.org>
Tue, 25 Jan 2011 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:37:07 +0000 (06:37 +0000)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/global/smtp_stream.c
postfix/src/global/smtp_stream.h
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_chat.c

index 7b1195fbc1a05db41fafc9e1b777967323d3c6ab..4f44458f32c4ed8d0df4b11631eccb99ebb0d227 100644 (file)
@@ -16527,3 +16527,9 @@ Apologies for any names omitted.
 
        Cleanup: remove #ifdef MIGRATION_WARNING transitional code
        from postscreen. File: postscreen/postscreen.c.
+
+20110124
+
+       Cleanup: use the right primitive to flush responses when
+       the Postfix SMTP server is taking an excessive amount of
+       time to process client requests. File: smtpd/smtpd_chat.c.
index 77e8821a0d257e23ee86e4db35a2111fbbf7707f..58c4b5156110a4abf5f3ac63d67515b433a8b72f 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20110124"
+#define MAIL_RELEASE_DATE      "20110125"
 #define MAIL_VERSION_NUMBER    "2.9"
 
 #ifdef SNAPSHOT
index 73ad8705418082a3320a208d00239aa32fa4a2fd..4978514a2d7e3996c3d4c275912192371827ecdb 100644 (file)
@@ -10,6 +10,9 @@
 /*     VSTREAM *stream;
 /*     int     timeout;
 /*
+/*     void    smtp_timeout_reset(stream)
+/*     VSTREAM *stream;
+/*
 /*     void    smtp_printf(stream, format, ...)
 /*     VSTREAM *stream;
 /*     const char *format;
 /* .IP \f(bu
 /*     The stream is configured to enable exception handling.
 /* .PP
+/*     smtp_timeout_reset() clears the error flags and restarts
+/*     the deadline timer for the named stream. This leaves the
+/*     stream in a state that is suitable for the final "flush
+/*     before close" operation, without depending on any other
+/*     primitives provided by this module.
+/*
 /*     smtp_printf() formats its arguments and writes the result to
 /*     the named stream, followed by a CR LF pair. The stream is NOT flushed.
 /*     Long lines of text are not broken.
 
 #include "smtp_stream.h"
 
-/* smtp_timeout_reset - reset per-stream timeout flag */
+/* smtp_timeout_reset - reset per-stream error flags and read/write deadline */
 
-static void smtp_timeout_reset(VSTREAM *stream)
+void smtp_timeout_reset(VSTREAM *stream)
 {
     vstream_clearerr(stream);
 
index 5593922164404cf73475565576c3e36b842788c3..c481d0b9b609f59176c890e87d034bee6710e4b5 100644 (file)
@@ -33,6 +33,7 @@
 #define SMTP_ERR_NONE  4               /* non-error case */
 
 extern void smtp_timeout_setup(VSTREAM *, int);
+extern void smtp_timeout_reset(VSTREAM *);
 extern void PRINTFLIKE(2, 3) smtp_printf(VSTREAM *, const char *,...);
 extern void smtp_flush(VSTREAM *);
 extern int smtp_fgetc(VSTREAM *);
index 3dd9367b928b855a8f88d111c0af7bcb159efab8..c37c1523e1a3caf74f4048dd3f48075e5d027292 100644 (file)
@@ -4667,6 +4667,7 @@ static void smtpd_proto(SMTPD_STATE *state)
        }
        break;
     }
+    smtp_timeout_reset(state->client);
 
     /*
      * XXX The client connection count/rate control must be consistent in its
index da6e80ce657713896a50bab7d777fef83dbfc310..41c1884f109c62252613f1c218cd25fccbaaf2bf 100644 (file)
@@ -199,7 +199,7 @@ void    smtpd_chat_reply(SMTPD_STATE *state, const char *format,...)
      * delays (tarpit delays or DNS lookups for UCE restrictions).
      */
     if (delay || time((time_t *) 0) - vstream_ftime(state->client) > 10)
-       vstream_fflush(state->client);
+       smtp_flush(state->client);              /* fix 20110124 */
 
     /*
      * Abort immediately if the connection is broken.