[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107112: nnimap.el: Fix inloop if the
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107112: nnimap.el: Fix inloop if the server dies before the async -finish is called |
Date: |
Sun, 05 Feb 2012 06:31:38 +0000 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107112
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sun 2012-02-05 06:31:38 +0000
message:
nnimap.el: Fix inloop if the server dies before the async -finish is called
modified:
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2012-02-02 22:10:47 +0000
+++ b/lisp/gnus/ChangeLog 2012-02-05 06:31:38 +0000
@@ -1,3 +1,11 @@
+2012-02-05 Lars Ingebrigtsen <address@hidden>
+
+ * 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 <address@hidden>
* nnimap.el (nnimap-retrieve-group-data-early): Don't say we're doing
=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el 2012-02-02 22:10:47 +0000
+++ b/lisp/gnus/nnimap.el 2012-02-05 06:31:38 +0000
@@ -269,14 +269,16 @@
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)
- (or (nnimap-find-connection nntp-server-buffer)
- (nnimap-open-connection nntp-server-buffer))))
+ (if no-reconnect
+ (nnimap-find-connection nntp-server-buffer)
+ (or (nnimap-find-connection nntp-server-buffer)
+ (nnimap-open-connection nntp-server-buffer)))))
(defun nnimap-make-process-buffer (buffer)
(with-current-buffer
@@ -1278,7 +1280,7 @@
(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 @@
(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 nil no-reconnect)))
(cond
((not open-result)
nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107112: nnimap.el: Fix inloop if the server dies before the async -finish is called,
Katsumi Yamaoka <=