]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with changing to correct NNTP server
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 27 Sep 2019 00:17:14 +0000 (02:17 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 27 Sep 2019 00:17:14 +0000 (02:17 +0200)
* lisp/gnus/nntp.el (nntp-close-server):
* lisp/gnus/nnimap.el (nnimap-close-server):
* lisp/gnus/gnus-int.el (gnus-close-server): Take an optional DEFS
parameter to enable switching to the correct nnoo server (bug#20319)
when there's two servers with the same address.

lisp/gnus/gnus-int.el
lisp/gnus/nnbabyl.el
lisp/gnus/nnimap.el
lisp/gnus/nnmbox.el
lisp/gnus/nnregistry.el
lisp/gnus/nntp.el
lisp/gnus/nnweb.el

index b27a8a18ebf3422dccc95e85730b705869783f41..0abbfe6720b68bd14695e2a759ac389733a605b5 100644 (file)
@@ -352,7 +352,8 @@ If it is down, start it up (again)."
   (when (stringp gnus-command-method)
     (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
   (funcall (gnus-get-function gnus-command-method 'close-server)
-          (nth 1 gnus-command-method)))
+          (nth 1 gnus-command-method)
+          (nthcdr 2 gnus-command-method)))
 
 (defun gnus-request-list (gnus-command-method)
   "Request the active file from GNUS-COMMAND-METHOD."
index 0f4f4303cd8ee57211a47dfbb2c41eb745e624ba..46d52446075ae8939409e9480244d1ffed4d4bc5 100644 (file)
                     nnbabyl-mbox-file)
     t)))
 
-(deffoo nnbabyl-close-server (&optional server)
+(deffoo nnbabyl-close-server (&optional server _defs)
   ;; Restore buffer mode.
   (when (and (nnbabyl-server-opened)
             nnbabyl-previous-buffer-mode)
index 345667b927b6c558a010cb32c7bccfb338536361..2c91ba0bf5e6aaf075bdfb906a0b47deb66413ed 100644 (file)
@@ -627,8 +627,8 @@ textual parts.")
        (setq result (cdr (cadr elem))))))
     result))
 
-(deffoo nnimap-close-server (&optional server)
-  (when (nnoo-change-server 'nnimap server nil)
+(deffoo nnimap-close-server (&optional server defs)
+  (when (nnoo-change-server 'nnimap server defs)
     (ignore-errors
       (delete-process (get-buffer-process (nnimap-buffer))))
     (nnoo-close-server 'nnimap server)
index 110f39a867f764182fe581266d8da4a49c6a0259..3b704961f01544bcf587b5fc329e296f29574b07 100644 (file)
                     nnmbox-mbox-file)
     t)))
 
-(deffoo nnmbox-close-server (&optional server)
+(deffoo nnmbox-close-server (&optional server _defs)
   (when (buffer-live-p nnmbox-mbox-buffer)
     (kill-buffer nnmbox-mbox-buffer))
   (nnoo-close-server 'nnmbox server)
index 6dcdac5462374b605483f6e2b57cf0dac36fc046..ab9a8a97f8cfaea560c916a14b40fcdf25643a0f 100644 (file)
@@ -39,7 +39,7 @@
 (deffoo nnregistry-server-opened (server)
   gnus-registry-enabled)
 
-(deffoo nnregistry-close-server (server)
+(deffoo nnregistry-close-server (server &optional defs)
   t)
 
 (deffoo nnregistry-status-message (server)
index 49aa6ab14463618e39db79ded657df008ec03743..24084a3fe0b2f139bf7d6663a10cc2905aad9e28 100644 (file)
@@ -1062,7 +1062,8 @@ command whose response triggered the error."
       (or (nntp-find-connection nntp-server-buffer)
          (nntp-open-connection nntp-server-buffer)))))
 
-(deffoo nntp-close-server (&optional server)
+(deffoo nntp-close-server (&optional server defs)
+  (nnoo-change-server 'nntp server defs)
   (nntp-possibly-change-group nil server t)
   (let ((process (nntp-find-connection nntp-server-buffer)))
     (while process
index b08b27dd1eb73925f1699a58a64fa6456f879bc4..e25f373bdf3cadb497687a2f9d96216506616bc0 100644 (file)
@@ -170,7 +170,7 @@ Valid types include `google', `dejanews', and `gmane'.")
        (nnheader-report 'nnweb "Fetched article %s" article)
        (cons group (and (numberp article) article))))))
 
-(deffoo nnweb-close-server (&optional server)
+(deffoo nnweb-close-server (&optional server _defs)
   (when (and (nnweb-server-opened server)
             (gnus-buffer-live-p nnweb-buffer))
     (with-current-buffer nnweb-buffer