Code

git-send-email: Do not attempt to STARTTLS more than once
authorThomas Rast <trast@student.ethz.ch>
Wed, 2 Jul 2008 22:11:31 +0000 (00:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Jul 2008 05:41:18 +0000 (22:41 -0700)
With the previous TLS patch, send-email would attempt to STARTTLS at
the beginning of every mail, despite reusing the last connection.  We
simply skip further encryption checks after successful TLS initiation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index a047b016e34c995152a05318dd322f49cb23f57e..3564419e81694d84f4ebf036fe0df70277a81a98 100755 (executable)
@@ -772,6 +772,7 @@ X-Mailer: git-send-email $gitversion
                                if ($smtp->code == 220) {
                                        $smtp = Net::SMTP::SSL->start_SSL($smtp)
                                                or die "STARTTLS failed! ".$smtp->message;
+                                       $smtp_encryption = '';
                                } else {
                                        die "Server does not support STARTTLS! ".$smtp->message;
                                }