[exim-cvs] Bugzilla #1006: Keep EHLO attributes in case STAR…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Bugzilla #1006: Keep EHLO attributes in case STARTTLS errors are ignored
Gitweb: http://git.exim.org/exim.git;a=commit;h=d41e4a9122eb42ec4fdc3bc6cc2a5094d0e515f1
Commit:     d41e4a9122eb42ec4fdc3bc6cc2a5094d0e515f1
Parent:     a56f166d182394d5e339bb50bc1725a3f98c768a
Author:     Tom Kistner <tom@???>
AuthorDate: Mon Jul 19 11:47:27 2010 +0200
Committer:  Tom Kistner <tom@???>
CommitDate: Mon Jul 19 11:47:27 2010 +0200


    Bugzilla #1006: Keep EHLO attributes in case STARTTLS errors are ignored


    Applied patch submitted by Micha Lenk. Thanks!
---
 src/src/transports/smtp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index fb55ae0..41796a4 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1078,10 +1078,12 @@ if (tls_offered && !suppress_tls &&
   if (!smtp_read_response(&inblock, buffer2, sizeof(buffer2), '2',
       ob->command_timeout))
     {
-    Ustrncpy(buffer, buffer2, sizeof(buffer));
     if (errno != 0 || buffer2[0] == 0 ||
          (buffer2[0] == '4' && !ob->tls_tempfail_tryclear))
+      {
+      Ustrncpy(buffer, buffer2, sizeof(buffer));
       goto RESPONSE_FAILED;
+      }
     }


/* STARTTLS accepted: try to negotiate a TLS session. */