From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25617 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: hang on entry to group Date: 03 Oct 1999 02:27:00 -0400 Organization: U of Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <2nr9jdnemj.fsf@tiger.jia.vnet> References: <5b670ph10p.fsf@giga.cs.rochester.edu> <2ng0ztgjvp.fsf@tiger.jia.vnet> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035162970 14956 80.91.224.250 (21 Oct 2002 01:16:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:16:10 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id CAA15132 for ; Sun, 3 Oct 1999 02:25:19 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id BAB18994; Sun, 3 Oct 1999 01:24:39 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 03 Oct 1999 01:25:12 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id BAA04276 for ; Sun, 3 Oct 1999 01:25:01 -0500 (CDT) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id CAA15119 for ; Sun, 3 Oct 1999 02:23:02 -0400 (EDT) Original-Received: from heart.cs.rochester.edu (heart.cs.rochester.edu [192.5.53.109]) by cayuga.cs.rochester.edu (8.9.3/Q) with ESMTP id CAA02590 for ; Sun, 3 Oct 1999 02:22:56 -0400 (EDT) Original-Received: (from zsh@localhost) by heart.cs.rochester.edu (8.9.3/8.9.3) id CAA03808; Sun, 3 Oct 1999 02:27:01 -0400 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Shenghuo ZHU's message of "03 Oct 1999 00:15:22 -0400" Original-Lines: 19 User-Agent: Gnus/5.07009701 (Pterodactyl Gnus v0.97.1) XEmacs/21.2 (Shinjuku) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25617 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25617 --=-=-= >>>>> "ZSH" == Shenghuo ZHU writes: ZSH> There are still other bugs which cause Gnus hanging. Fixed. The ChangeLog and the patch follow and have been committed to CVS. Apply the previous patch also. -- Shenghuo ZHU 1999-10-03 Shenghuo ZHU * nntp.el (nntp-retrieve-headers-with-xover): Fix hanging problem. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=97-zsh4.diff Index: nntp.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nntp.el,v retrieving revision 5.21 diff -u -r5.21 nntp.el --- nntp.el 1999/10/02 21:57:40 5.21 +++ nntp.el 1999/10/03 05:59:13 @@ -1118,9 +1118,10 @@ ((numberp nntp-nov-gap) (let ((count 0) (received 0) - (last-point (point-min)) + last-point + in-process-buffer-p (buf nntp-server-buffer) - ;;(process-buffer (nntp-find-connection (current-buffer)))) + (process-buffer (nntp-find-connection-buffer nntp-server-buffer)) first) ;; We have to check `nntp-server-xover'. If it gets set to nil, ;; that means that the server does not understand XOVER, but we @@ -1133,40 +1134,50 @@ (< (- (nth 1 articles) (car articles)) nntp-nov-gap)) (setq articles (cdr articles))) - (when (nntp-send-xover-command first (car articles)) - (setq articles (cdr articles) - count (1+ count)) - + (setq in-process-buffer-p (stringp nntp-server-xover)) + (nntp-send-xover-command first (car articles)) + (setq articles (cdr articles)) + + (when (and nntp-server-xover in-process-buffer-p) + ;; Don't count tried request. + (setq count (1+ count)) + ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. (zerop (% count nntp-maximum-request))) - (accept-process-output) + + (nntp-accept-response) ;; On some Emacs versions the preceding function has ;; a tendency to change the buffer. Perhaps. It's ;; quite difficult to reproduce, because it only ;; seems to happen once in a blue moon. - (set-buffer buf) + (set-buffer process-buffer) (while (progn - (goto-char last-point) + (goto-char (or last-point (point-min))) ;; Count replies. (while (re-search-forward "^[0-9][0-9][0-9] " nil t) (setq received (1+ received))) (setq last-point (point)) (< received count)) - (accept-process-output) - (set-buffer buf))))) + (nntp-accept-response) + (set-buffer process-buffer)) + (set-buffer buf)))) (when nntp-server-xover - ;; Wait for the reply from the final command. - (goto-char (point-max)) - (re-search-backward "^[0-9][0-9][0-9] " nil t) - (when (looking-at "^[23]") - (while (progn - (goto-char (point-max)) - (forward-line -1) - (not (looking-at "^\\.\r?\n"))) - (nntp-accept-response))) + (when in-process-buffer-p + (set-buffer process-buffer) + ;; Wait for the reply from the final command. + (goto-char (point-max)) + (re-search-backward "^[0-9][0-9][0-9] " nil t) + (when (looking-at "^[23]") + (while (progn + (goto-char (point-max)) + (forward-line -1) + (not (looking-at "^\\.\r?\n"))) + (nntp-accept-response) + (set-buffer process-buffer))) + (set-buffer buf)) ;; We remove any "." lines and status lines. (goto-char (point-min)) --=-=-=--