Gnus development mailing list
 help / color / mirror / Atom feed
From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: Re: hang on entry to group
Date: 03 Oct 1999 02:27:00 -0400	[thread overview]
Message-ID: <2nr9jdnemj.fsf@tiger.jia.vnet> (raw)
In-Reply-To: Shenghuo ZHU's message of "03 Oct 1999 00:15:22 -0400"

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

>>>>> "ZSH" == Shenghuo ZHU <zsh@cs.rochester.edu> 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  <zsh@cs.rochester.edu>

	* nntp.el (nntp-retrieve-headers-with-xover): Fix hanging problem.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 97-zsh4.diff --]
[-- Type: text/x-patch, Size: 3025 bytes --]

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))

  reply	other threads:[~1999-10-03  6:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-02 19:17 Laura Conrad
1999-10-02 19:22 ` Laura Conrad
1999-10-02 22:05 ` Shenghuo ZHU
1999-10-03  4:15   ` Shenghuo ZHU
1999-10-03  6:27     ` Shenghuo ZHU [this message]
1999-10-03  7:07       ` Shenghuo ZHU

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=2nr9jdnemj.fsf@tiger.jia.vnet \
    --to=zsh@cs.rochester.edu \
    /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).