[gnus git] branch master updated: n0-15-61-g44c81a2 =2= Add a sanity check so that we don't issue two async commands to the same server at the same time. ; * gnus-start.el (gnus-get-unread-articles): Slight cleanup.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 44c81a2452c6b048f822af5264de8720a8bd2075 (commit)
via efdd02bd5791b375770423c846bdd38c70938b61 (commit)
from e157d87cbd9372d6afe8104b036273b98112df85 (commit)
- Log -----------------------------------------------------------------
commit 44c81a2452c6b048f822af5264de8720a8bd2075
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Apr 12 19:53:30 2011 +0200
Add a sanity check so that we don't issue two async commands to the same server at the same time.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 85fa440..347c7fb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,10 @@
2011-04-12 Lars Magne Ingebrigtsen <[email protected]>
* gnus-start.el (gnus-get-unread-articles): Slight cleanup.
+ (gnus-read-active-for-groups): Don't try to finish getting stuff where
+ we had no early-data returned.
+ (gnus-get-unread-articles): Add a sanity check so that we don't issue
+ two async commands to the same server at the same time.
2011-04-12 Stig Sandbeck Mathisen <[email protected]> (tiny change)
diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el
index 650b94b..96f6055 100644
--- a/lisp/gnus-start.el
+++ b/lisp/gnus-start.el
@@ -1699,8 +1699,11 @@ If SCAN, request a scan of that group as well."
(gnus-read-active-file-1 method nil))))
;; Start early async retrieval of data.
+ (let ((done-methods nil)
+ sanity-spec)
(dolist (elem type-cache)
(destructuring-bind (method method-type infos dummy) elem
+ (setq sanity-spec (list (car method) (cadr method)))
(when (and method infos
(not (gnus-method-denied-p method)))
;; If the open-server method doesn't exist, then the method
@@ -1710,15 +1713,23 @@ If SCAN, request a scan of that group as well."
(unless (gnus-server-opened method)
(gnus-open-server method))
(when (and
+ ;; This is a sanity check, so that we never
+ ;; attempt to start two async requests to the
+ ;; same server, because that will fail. This
+ ;; should never happen, since the methods should
+ ;; be unique at this point, but apparently it
+ ;; does happen in the wild with some setups.
+ (not (member sanity-spec done-methods))
(gnus-server-opened method)
(gnus-check-backend-function
'retrieve-group-data-early (car method)))
+ (push sanity-spec done-methods)
(when (gnus-check-backend-function 'request-scan (car method))
(gnus-request-scan nil method))
;; Store the token we get back from -early so that we
;; can pass it to -finish later.
(setcar (nthcdr 3 elem)
- (gnus-retrieve-group-data-early method infos)))))))
+ (gnus-retrieve-group-data-early method infos))))))))
;; Do the rest of the retrieval.
(dolist (elem type-cache)
@@ -1762,6 +1773,7 @@ If SCAN, request a scan of that group as well."
;; Finish up getting the data from the methods that have -early
;; methods.
((and
+ early-data
(gnus-check-backend-function 'finish-retrieve-group-infos (car method))
(or (not (gnus-agent-method-p method))
(gnus-online method)))
commit efdd02bd5791b375770423c846bdd38c70938b61
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Apr 12 19:47:16 2011 +0200
* gnus-start.el (gnus-get-unread-articles): Slight cleanup.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b7ba4b9..85fa440 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-12 Lars Magne Ingebrigtsen <[email protected]>
+
+ * gnus-start.el (gnus-get-unread-articles): Slight cleanup.
+
2011-04-12 Stig Sandbeck Mathisen <[email protected]> (tiny change)
* gnus-sum.el (gnus-summary-select-article-buffer): Doc fix.
diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el
index d9d218c..650b94b 100644
--- a/lisp/gnus-start.el
+++ b/lisp/gnus-start.el
@@ -1724,8 +1724,7 @@ If SCAN, request a scan of that group as well."
(dolist (elem type-cache)
(destructuring-bind (method method-type infos early-data) elem
(when (and method infos
- (not (eq (gnus-server-status method)
- 'denied)))
+ (gnus-method-denied-p method))
(let ((updatep (gnus-check-backend-function
'request-update-info (car method))))
;; See if any of the groups from this method require updating.
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 8 +++++++
lisp/gnus-start.el | 55 +++++++++++++++++++++++++++++++--------------------
2 files changed, 41 insertions(+), 22 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project