/[emacs]/emacs/lisp/gnus/nntp.el
ViewVC logotype

Diff of /emacs/lisp/gnus/nntp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by zsh, Wed Jan 9 03:42:12 2002 UTC revision 1.16.4.1 by miles, Fri Apr 4 06:20:21 2003 UTC
# Line 1  Line 1 
1  ;;; nntp.el --- nntp access for Gnus  ;;; nntp.el --- nntp access for Gnus
2    
3  ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996,  ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996,
4  ;;        1997, 1998, 2000, 2001, 2002  ;; 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 ;;        Free Software Foundation, Inc.  
5    
6  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7  ;; Keywords: news  ;; Keywords: news
# Line 223  noticing asynchronous data.") Line 223  noticing asynchronous data.")
223  (defvar nntp-async-timer nil)  (defvar nntp-async-timer nil)
224  (defvar nntp-async-process-list nil)  (defvar nntp-async-process-list nil)
225    
226    (defvar nntp-ssl-program
227      "openssl s_client -quiet -ssl3 -connect %s:%p"
228    "A string containing commands for SSL connections.
229    Within a string, %s is replaced with the server address and %p with
230    port number on server.  The program should accept IMAP commands on
231    stdin and return responses to stdout.")
232    
233  (eval-and-compile  (eval-and-compile
234    (autoload 'mail-source-read-passwd "mail-source")    (autoload 'mail-source-read-passwd "mail-source"))
   (autoload 'open-ssl-stream "ssl"))  
235    
236    
237    
# Line 350  noticing asynchronous data.") Line 356  noticing asynchronous data.")
356               (wait-for               (wait-for
357                (nntp-wait-for process wait-for buffer decode))                (nntp-wait-for process wait-for buffer decode))
358               (t t)))               (t t)))
359          (error          (error
360           (nnheader-report 'nntp "Couldn't open connection to %s: %s"           (nnheader-report 'nntp "Couldn't open connection to %s: %s"
361                            address err))                            address err))
362          (quit          (quit
363           (message "Quit retrieving data from nntp")           (message "Quit retrieving data from nntp")
# Line 921  password contained in '~/.nntp-authinfo' Line 927  password contained in '~/.nntp-authinfo'
927    (open-network-stream "nntpd" buffer nntp-address nntp-port-number))    (open-network-stream "nntpd" buffer nntp-address nntp-port-number))
928    
929  (defun nntp-open-ssl-stream (buffer)  (defun nntp-open-ssl-stream (buffer)
930    (let* ((ssl-program-arguments '("-connect" (concat host ":" service)))    (let* ((process-connection-type nil)
931           (proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))           (proc (start-process "nntpd" buffer
932                                  shell-file-name
933                                  shell-command-switch
934                                  (format-spec nntp-ssl-program
935                                               (format-spec-make
936                                                ?s nntp-address
937                                                ?p nntp-port-number)))))
938        (process-kill-without-query proc)
939      (save-excursion      (save-excursion
940        (set-buffer buffer)        (set-buffer buffer)
941        (nntp-wait-for-string "^\r*20[01]")        (nntp-wait-for-string "^\r*20[01]")
# Line 1051  password contained in '~/.nntp-authinfo' Line 1064  password contained in '~/.nntp-authinfo'
1064    (save-excursion    (save-excursion
1065      (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)      (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
1066                      nntp-server-buffer))                      nntp-server-buffer))
1067      (let ((len (/ (point-max) 1024))      (let ((len (/ (buffer-size) 1024))
1068            message-log-max)            message-log-max)
1069        (unless (< len 10)        (unless (< len 10)
1070          (setq nntp-have-messaged t)          (setq nntp-have-messaged t)
# Line 1179  password contained in '~/.nntp-authinfo' Line 1192  password contained in '~/.nntp-authinfo'
1192          (setq in-process-buffer-p (stringp nntp-server-xover))          (setq in-process-buffer-p (stringp nntp-server-xover))
1193          (nntp-send-xover-command first (car articles))          (nntp-send-xover-command first (car articles))
1194          (setq articles (cdr articles))          (setq articles (cdr articles))
1195            
1196          (when (and nntp-server-xover in-process-buffer-p)          (when (and nntp-server-xover in-process-buffer-p)
1197            ;; Don't count tried request.            ;; Don't count tried request.
1198            (setq count (1+ count))            (setq count (1+ count))
1199              
1200            ;; Every 400 requests we have to read the stream in            ;; Every 400 requests we have to read the stream in
1201            ;; order to avoid deadlocks.            ;; order to avoid deadlocks.
1202            (when (or (null articles)     ;All requests have been sent.            (when (or (null articles)     ;All requests have been sent.

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.16.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26