From 5d42b78a7e488f1e0e1869c3e549f09b3567c7e5 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 23 Feb 2001 09:13:45 +0000 Subject: [PATCH] update. --- imap/imap.c | 6 ++++-- mutt_ssl.c | 28 +++++++++++++++++++++++----- po/ru.po | 38 +++++++++++++++----------------------- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/imap/imap.c b/imap/imap.c index 80e4c73a..80460a2c 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -389,7 +389,8 @@ int imap_open_connection (IMAP_DATA* idata) { if (mutt_ssl_starttls (idata->conn)) { - dprint (1, (debugfile, "imap_open_connection: STARTTLS failed\n")); + mutt_error ("Could not negotiate TLS connection"); + sleep (1); goto bail; } else @@ -1052,7 +1053,8 @@ int imap_check_mailbox (CONTEXT *ctx, int *index_hint) idata = (IMAP_DATA*) ctx->data; now = time(NULL); - if (now > ImapLastCheck + Timeout) { + if (now > ImapLastCheck + Timeout) + { ImapLastCheck = now; if (imap_exec (idata, "NOOP", 0) != 0) diff --git a/mutt_ssl.c b/mutt_ssl.c index ac52e1f1..50a3b234 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -300,14 +300,32 @@ int ssl_socket_open (CONNECTION * conn) * SSL over the wire, including certificate checks. */ int ssl_negotiate (sslsockdata* ssldata) { - if (SSL_connect (ssldata->ssl) != 1) + int err; + const char* errmsg; + +#if OPENSSL_VERSION_NUMBER >= 0x0090600 + /* This only exists in 0.9.6 and above. Without it we may get interrupted + * reads or writes. Bummer. */ + SSL_set_mode (ssldata->ssl, SSL_MODE_AUTO_RETRY); +#endif + + if ((err = SSL_connect (ssldata->ssl)) != 1) { - unsigned long e; - while ((e = ERR_get_error()) != 0) + switch (SSL_get_error (ssldata->ssl, err)) { - mutt_error ("SSL failed: %s", ERR_reason_error_string(e)); - sleep (1); + case SSL_ERROR_SYSCALL: + errmsg = "I/O error"; + break; + case SSL_ERROR_SSL: + errmsg = "unspecified protocol error"; + break; + default: + errmsg = "unknown error"; } + + mutt_error ("SSL failed: %s", errmsg); + sleep (1); + return -1; } diff --git a/po/ru.po b/po/ru.po index 6216ea83..96492b06 100644 --- a/po/ru.po +++ b/po/ru.po @@ -10,9 +10,9 @@ # msgid "" msgstr "" -"Project-Id-Version: mutt-1.3.11i\n" +"Project-Id-Version: mutt-1.3.15i\n" "POT-Creation-Date: 2001-02-12 18:52+0100\n" -"PO-Revision-Date: 2000-11-01 19:35+0200\n" +"PO-Revision-Date: 2001-02-13 15:20+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=koi8-r\n" "Content-Transfer-Encoding: 8bit\n" @@ -505,15 +505,12 @@ msgid "" msgstr "<ÐÏ ÕÍÏÌÞÁÎÉÀ>" #: compose.c:132 -#, fuzzy msgid "(e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "" -"(e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (m)ic-ÁÌÇÏÒÉÔÍ, (f)ÏÔËÁÚÁÔØÓÑ? " +msgstr "(e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (f)ÏÔËÁÚÁÔØÓÑ? " #: compose.c:133 -#, fuzzy msgid "esabf" -msgstr "esabmf" +msgstr "esabf" #: compose.c:147 msgid "Sign as: " @@ -1189,9 +1186,9 @@ msgstr "" "ÎÉÍ." #: imap/imap.c:315 -#, fuzzy, c-format +#, c-format msgid "Connection to %s failed." -msgstr "õÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ÓÏÅÄÉÎÅÎÉÅ Ó %s..." +msgstr "îÅ ÕÄÁÌÏÓØ ÕÓÔÁÎÏ×ÉÔØ ÓÏÅÄÉÎÅÎÉÅ Ó %s." #: imap/imap.c:453 #, c-format @@ -1444,9 +1441,8 @@ msgid "view attachment as text" msgstr "ÐÏËÁÚÁÔØ ×ÌÏÖÅÎÉÅ ËÁË ÔÅËÓÔ" #: keymap_alldefs.h:8 -#, fuzzy msgid "Toggle display of subparts" -msgstr "ÒÁÚÒÅÛÉÔØ/ÚÁÐÒÅÔÉÔØ ÏÔÏÂÒÁÖÅÎÉÅ ÃÉÔÉÒÕÅÍÏÇÏ ÔÅËÓÔÁ" +msgstr "òÁÚÒÅÛÉÔØ/ÚÁÐÒÅÔÉÔØ ÏÔÏÂÒÁÖÅÎÉÅ ÞÁÓÔÅÊ ÄÁÊÄÖÅÓÔÁ" #: keymap_alldefs.h:9 msgid "move to the bottom of the page" @@ -1832,9 +1828,8 @@ msgid "delete messages matching a pattern" msgstr "ÕÄÁÌÉÔØ ÓÏÏÂÝÅÎÉÑ ÐÏ ÏÂÒÁÚÃÕ" #: keymap_alldefs.h:105 -#, fuzzy msgid "force retrieval of mail from IMAP server" -msgstr "ÚÁÂÒÁÔØ ÐÏÞÔÕ Ó POP-ÓÅÒ×ÅÒÁ" +msgstr "ÚÁÂÒÁÔØ ÐÏÞÔÕ Ó IMAP-ÓÅÒ×ÅÒÁ" #: keymap_alldefs.h:106 msgid "retrieve mail from POP server" @@ -2584,9 +2579,9 @@ msgid "Unable to get certificate from peer" msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ ÓÅÒÔÉÆÉËÁÔ ÓÅÒ×ÅÒÁ" #: mutt_ssl.c:257 -#, fuzzy, c-format +#, c-format msgid "SSL connection using %s (%s)" -msgstr "SSL-ÓÏÅÄÉÎÅÎÉÅ ÕÓÔÁÎÏ×ÌÅÎÏ; ÁÌÇÏÒÉÔÍ ÛÉÆÒÏ×ÁÎÉÑ %s" +msgstr "SSL-ÓÏÅÄÉÎÅÎÉÅ ÕÓÔÁÎÏ×ÌÅÎÏ; ÁÌÇÏÒÉÔÍ ÛÉÆÒÏ×ÁÎÉÑ %s (%s)" #: mutt_ssl.c:287 msgid "Unknown" @@ -2841,9 +2836,9 @@ msgstr " #. getDate has its own error message, don't overwrite it here #: pattern.c:527 -#, fuzzy, c-format +#, c-format msgid "Invalid relative date: %s" -msgstr "îÅ×ÅÒÎÏÅ ÎÁÚ×ÁÎÉÅ ÍÅÓÑÃÁ: %s" +msgstr "îÅ×ÅÒÎÏ ÕËÁÚÁÎÁ ÏÔÎÏÓÉÔÅÌØÎÁÑ ÄÁÔÁ: %s" #: pattern.c:541 msgid "error in expression" @@ -3366,9 +3361,8 @@ msgid "Attachments" msgstr "÷ÌÏÖÅÎÉÑ" #: recvattach.c:919 -#, fuzzy msgid "There are no subparts to show!" -msgstr "÷ÌÏÖÅÎÉÊ ÎÅÔ." +msgstr "äÁÊÄÖÅÓÔ ÎÅ ÓÏÄÅÒÖÉÔ ÎÉ ÏÄÎÏÊ ÞÁÓÔÉ!" #: recvattach.c:967 msgid "Can't delete attachment from POP server." @@ -3402,9 +3396,8 @@ msgid "Can't open temporary file %s." msgstr "îÅ ÕÄÁÌÏÓØ ÏÔËÒÙÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ %s." #: recvcmd.c:398 -#, fuzzy msgid "Forward as attachments?" -msgstr "ÐÏËÁÚÁÔØ ×ÌÏÖÅÎÉÑ" +msgstr "ðÅÒÅÓÌÁÔØ ËÁË ×ÌÏÖÅÎÉÑ?" #: recvcmd.c:412 msgid "Can't decode all tagged attachments. MIME-forward the others?" @@ -3562,9 +3555,8 @@ msgid "Could not include all requested messages!" msgstr "îÅ ÕÄÁÌÏÓØ ×ÓÔÁ×ÉÔØ ×ÓÅ ÚÁÔÒÅÂÏ×ÁÎÎÙÅ ÓÏÏÂÝÅÎÉÑ!" #: send.c:739 -#, fuzzy msgid "Forward as attachment?" -msgstr "îÁÐÅÞÁÔÁÔØ ×ÌÏÖÅÎÉÅ?" +msgstr "ðÅÒÅÓÌÁÔØ ËÁË ×ÌÏÖÅÎÉÅ?" #: send.c:743 msgid "Preparing forwarded message..." -- 2.40.0