emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/nntp.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/nntp.el
Date: Fri, 09 Dec 2005 03:58:01 -0500

Index: emacs/lisp/gnus/nntp.el
diff -c emacs/lisp/gnus/nntp.el:1.29 emacs/lisp/gnus/nntp.el:1.30
*** emacs/lisp/gnus/nntp.el:1.29        Fri Sep 30 03:03:52 2005
--- emacs/lisp/gnus/nntp.el     Fri Dec  9 08:57:57 2005
***************
*** 102,108 ****
  (defvoo nntp-end-of-line "\r\n"
    "*String to use on the end of lines when talking to the NNTP server.
  This is \"\\r\\n\" by default, but should be \"\\n\" when
! using and indirect connection method (nntp-open-via-*).")
  
  (defvoo nntp-via-rlogin-command "rsh"
    "*Rlogin command used to connect to an intermediate host.
--- 102,108 ----
  (defvoo nntp-end-of-line "\r\n"
    "*String to use on the end of lines when talking to the NNTP server.
  This is \"\\r\\n\" by default, but should be \"\\n\" when
! using an indirect connection method (nntp-open-via-*).")
  
  (defvoo nntp-via-rlogin-command "rsh"
    "*Rlogin command used to connect to an intermediate host.
***************
*** 259,264 ****
--- 259,271 ----
  port number on server.  The program should accept IMAP commands on
  stdin and return responses to stdout.")
  
+ (defvar nntp-authinfo-rejected nil
+ "A custom error condition used to report 'Authentication Rejected' errors.  
+ Condition handlers that match just this condition ensure that the nntp 
+ backend doesn't catch this error.")
+ (put 'nntp-authinfo-rejected 'error-conditions '(error 
nntp-authinfo-rejected))
+ (put 'nntp-authinfo-rejected 'error-message "Authorization Rejected")
+ 
  
  
  ;;; Internal functions.
***************
*** 313,324 ****
      (set-buffer (process-buffer process))
      (goto-char (point-min))
      (while (and (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5)))
!                   (looking-at "480"))
                (memq (process-status process) '(open run)))
!       (when (looking-at "480")
        (nntp-handle-authinfo process))
!       (when (looking-at "^.*\n")
!       (delete-region (point) (progn (forward-line 1) (point))))
        (nntp-accept-process-output process)
        (goto-char (point-min)))
      (prog1
--- 320,334 ----
      (set-buffer (process-buffer process))
      (goto-char (point-min))
      (while (and (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5)))
!                   (looking-at "48[02]"))
                (memq (process-status process) '(open run)))
!       (cond ((looking-at "480")
        (nntp-handle-authinfo process))
!           ((looking-at "482")
!            (nnheader-report 'nntp (get 'nntp-authinfo-rejected 
'error-message))
!            (signal 'nntp-authinfo-rejected nil))
!           ((looking-at "^.*\n")
!            (delete-region (point) (progn (forward-line 1) (point)))))
        (nntp-accept-process-output process)
        (goto-char (point-min)))
      (prog1
***************
*** 411,416 ****
--- 421,428 ----
                   (wait-for
                    (nntp-wait-for process wait-for buffer decode))
                   (t t)))
+           (nntp-authinfo-rejected
+            (signal 'nntp-authinfo-rejected (cdr err)))
              (error
               (nnheader-report 'nntp "Couldn't open connection to %s: %s"
                                address err))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]