From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65662 Path: news.gmane.org!not-for-mail From: Denys Duchier Newsgroups: gmane.emacs.gnus.general Subject: Re: patch for "POP SSL connexion failed" Date: Wed, 14 Nov 2007 22:15:18 +0100 Message-ID: <873av88r6h.fsf@univ-orleans.fr> References: <87sl39vpzn.fsf@univ-orleans.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1195074989 3582 80.91.229.12 (14 Nov 2007 21:16:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2007 21:16:29 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14159@lists.math.uh.edu Wed Nov 14 22:16:33 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IsPav-0004KU-8k for ding-account@gmane.org; Wed, 14 Nov 2007 22:16:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IsPag-0003RI-MW; Wed, 14 Nov 2007 15:16:06 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IsPaf-0003R0-BJ for ding@lists.math.uh.edu; Wed, 14 Nov 2007 15:16:05 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IsPaZ-0006Fy-1U for ding@lists.math.uh.edu; Wed, 14 Nov 2007 15:16:05 -0600 Original-Received: from smtp20.orange.fr ([193.252.22.29]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IsPaS-0004ea-00 for ; Wed, 14 Nov 2007 22:15:52 +0100 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2013.orange.fr (SMTP Server) with ESMTP id 6688F1C0009E for ; Wed, 14 Nov 2007 22:15:21 +0100 (CET) Original-Received: from localhost.localdomain.univ-orleans.fr (AOrleans-157-1-53-42.w90-20.abo.wanadoo.fr [90.20.40.42]) by mwinf2013.orange.fr (SMTP Server) with ESMTP id DD4661C00099 for ; Wed, 14 Nov 2007 22:15:20 +0100 (CET) X-ME-UUID: 20071114211520906.DD4661C00099@mwinf2013.orange.fr In-Reply-To: (Katsumi Yamaoka's message of "Wed, 14 Nov 2007 21:07:02 +0900") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65662 Archived-At: --=-=-= Katsumi Yamaoka writes: > Do you have signed a paper for FSF? Otherwise, since it seems to be > able to regard as a tiny change, do you wish to go that way? I have not signed FSF papers and this is such a minuscule contribution I am hoping it is not necessary to do the paperwork. > Please write a ChangeLog entry by yourself, anyway. here you go: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=PATCH Content-Description: fix pop3-open-server ? PATCH Index: ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 7.1656 diff -u -r7.1656 ChangeLog --- ChangeLog 7 Nov 2007 07:42:35 -0000 7.1656 +++ ChangeLog 14 Nov 2007 21:10:09 -0000 @@ -1,3 +1,8 @@ +2007-11-14 Denys Duchier + + * pop3.el (pop3-open-server): accept and process data more robustly at + connexion start to avoid spurious "POP SSL connexion failed" errors. + 2007-11-05 Reiner Steib * message.el (message-citation-line-function) 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 14 Nov 2007 21:10:11 -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 --=-=-= Cheers, --Denys --=-=-=--