[gnus git] branch no-gnus updated: m0-1-21-g73c8c3d =1= Fix inloop if the server dies before the async -finish is called
Lars Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 73c8c3d05a901debb46e70f32f125ab4fa3ba540 (commit)
from 1e244029d8b4270d5fc0e32d943f39a51ca1ea88 (commit)
- Log -----------------------------------------------------------------
commit 73c8c3d05a901debb46e70f32f125ab4fa3ba540
Author: Lars Ingebrigtsen <[email protected]>
Date: Sun Feb 5 03:24:20 2012 +0100
Fix inloop if the server dies before the async -finish is called
* nnimap.el (nnimap-open-server): Allow switching the nnoo server
without reconnecting.
(nnimap-possibly-change-group): Ditto.
(nnimap-finish-retrieve-group-infos): Don't reconnect if the server
connection has died before being called.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3455764..c48f08c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2012-02-05 Lars Ingebrigtsen <[email protected]>
+
+ * nnimap.el (nnimap-open-server): Allow switching the nnoo server
+ without reconnecting.
+ (nnimap-possibly-change-group): Ditto.
+ (nnimap-finish-retrieve-group-infos): Don't reconnect if the server
+ connection has died before being called.
+
2012-02-02 Lars Ingebrigtsen <[email protected]>
* nnimap.el (nnimap-retrieve-group-data-early): Don't say we're doing
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index a5e8238..e62dc12 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -269,14 +269,16 @@ textual parts.")
result))
(mapconcat #'identity (nreverse result) ",")))))
-(deffoo nnimap-open-server (server &optional defs)
+(deffoo nnimap-open-server (server &optional defs no-reconnect)
(if (nnimap-server-opened server)
t
(unless (assq 'nnimap-address defs)
(setq defs (append defs (list (list 'nnimap-address server)))))
(nnoo-change-server 'nnimap server defs)
+ (if no-reconnect
+ (nnimap-find-connection nntp-server-buffer)
(or (nnimap-find-connection nntp-server-buffer)
- (nnimap-open-connection nntp-server-buffer))))
+ (nnimap-open-connection nntp-server-buffer)))))
(defun nnimap-make-process-buffer (buffer)
(with-current-buffer
@@ -1278,7 +1280,7 @@ textual parts.")
(deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
(when (and sequences
- (nnimap-possibly-change-group nil server)
+ (nnimap-possibly-change-group nil server t)
;; Check that the process is still alive.
(get-buffer-process (nnimap-buffer))
(memq (process-status (get-buffer-process (nnimap-buffer)))
@@ -1633,11 +1635,11 @@ textual parts.")
(cdr (assoc "SEARCH" (cdr result))))))
nil t))))))
-(defun nnimap-possibly-change-group (group server)
+(defun nnimap-possibly-change-group (group server &optional no-reconnect)
(let ((open-result t))
(when (and server
(not (nnimap-server-opened server)))
- (setq open-result (nnimap-open-server server)))
+ (setq open-result (nnimap-open-server server no-reconnect)))
(cond
((not open-result)
nil)
-----------------------------------------------------------------------
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/nnimap.el | 14 ++++++++------
2 files changed, 16 insertions(+), 6 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, no-gnus has been updated
hooks/post-receive
--
Gnus Project