From: Denys Duchier <denys.duchier@univ-orleans.fr>
To: ding@gnus.org
Subject: patch for "POP SSL connexion failed"
Date: Tue, 13 Nov 2007 21:40:12 +0100 [thread overview]
Message-ID: <87sl39vpzn.fsf@univ-orleans.fr> (raw)
I don't know if it was a change in gnus (I did not update in a very long
time) or a change in my POP server, but I have been getting something
like over 10 failed connexions for every 1 success ever since I cvs
up'ed. Here is a fix that seems to work well for me:
cvs server: Diffing .
Index: pop3.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/pop3.el,v
retrieving revision 7.26
diff -u -r7.26 pop3.el
--- pop3.el 4 Oct 2007 18:51:28 -0000 7.26
+++ pop3.el 13 Nov 2007 20:35:35 -0000
@@ -241,16 +241,20 @@
mailhost port)))
(when process
;; There's a load of info printed that needs deleting.
- (while (when (memq (process-status process) '(open run))
- (pop3-accept-process-output process)
- (goto-char (point-max))
- (forward-line -1)
- (if (looking-at "\\+OK")
- (progn
- (delete-region (point-min) (point))
- nil)
- (pop3-quit process)
- (error "POP SSL connexion failed"))))
+ (let ((again 't))
+ ;; repeat until
+ ;; - either we received the +OK line
+ ;; - or accept-process-output timed out without getting anything
+ (while (and again (setq again (memq (process-status process) '(open run))))
+ (setq again (pop3-accept-process-output process))
+ (goto-char (point-max))
+ (forward-line -1)
+ (cond ((looking-at "\\+OK")
+ (setq again nil)
+ (delete-region (point-min) (point)))
+ ((not again)
+ (pop3-quit-process)
+ (error "POP SSL connexion failed")))))
process)))
((eq pop3-stream-type 'starttls)
;; gnutls-cli, openssl don't accept service names
--Denys
next reply other threads:[~2007-11-13 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 20:40 Denys Duchier [this message]
2007-11-14 8:47 ` Leo
2007-11-14 12:07 ` Katsumi Yamaoka
2007-11-14 15:28 ` Leo
2007-11-14 21:15 ` Denys Duchier
2007-11-14 22:16 ` Katsumi Yamaoka
2007-11-16 20:07 ` rahed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sl39vpzn.fsf@univ-orleans.fr \
--to=denys.duchier@univ-orleans.fr \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).