* gnus-int.el (): Added require declarations to resolve
authorKevin Greiner <kevin.greiner@compsol.cc>
Tue, 14 Jan 2003 06:09:27 +0000 (06:09 +0000)
committerKevin Greiner <kevin.greiner@compsol.cc>
Tue, 14 Jan 2003 06:09:27 +0000 (06:09 +0000)
compile-time warnings.
(gnus-open-server): If the server status is set to offline,
recursively execute gnus-open-server to open the offline backend
(e.g. nnagent).

lisp/gnus-int.el

index e52bb5e..3536822 100644 (file)
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
+(require 'message)
+(require 'gnus-range)
+
+(eval-when-compile
+  (defun gnus-agent-expire (a b c)))
 
 (defcustom gnus-open-server-hook nil
   "Hook called just before opening connection to the news server."
@@ -219,12 +224,21 @@ If it is down, start it up (again)."
                               (format "Unable to open %s:%s, go offline? "
                                       (car gnus-command-method)
                                       (cadr gnus-command-method)))
-                             'offline
+                              'offline
                            'denied))
                    'denied)))
        ;; Return the result from the "open" call.
-       (or (eq (cadr elem) 'offline)
-           result)))))
+        (cond ((eq (cadr elem) 'offline)
+               ;; I'm avoiding infinite recursion by binding unopen
+               ;; status to denied (The logic of this routine
+               ;; guarantees that I can't get to this point with
+               ;; unopen status already bound to denied).
+               (unless (eq gnus-server-unopen-status 'denied)
+                 (let ((gnus-server-unopen-status 'denied))
+                   (gnus-open-server gnus-command-method)))
+               t)
+              (t
+               result))))))
 
 (defun gnus-close-server (gnus-command-method)
   "Close the connection to GNUS-COMMAND-METHOD."