diff options
author | Gnus developers <ding@gnus.org> | 2010-12-06 23:27:17 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-12-06 23:27:17 +0000 |
commit | 516aa569e1d70d51ae1d8d12a4b2e7281156cb8c (patch) | |
tree | f99a34c0796485fe87cb9c3198429afd5029f210 /lisp/gnus/proto-stream.el | |
parent | b31b26b48958fed0162d58c76dc55b2aeca22b66 (diff) | |
download | emacs-516aa569e1d70d51ae1d8d12a4b2e7281156cb8c.tar.gz |
proto-stream.el (proto-stream-open-tls): Return nil if we don't get any stream.
gnus.texi (Server Commands): Point to the rest of the server commands.
Diffstat (limited to 'lisp/gnus/proto-stream.el')
-rw-r--r-- | lisp/gnus/proto-stream.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index fe764dcf01d..6c90f3a112d 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el @@ -219,16 +219,18 @@ command to switch on STARTTLS otherwise." 'open-gnutls-stream 'open-tls-stream) name buffer host service))) - ;; If we're using tls.el, we have to delete the output from - ;; openssl/gnutls-cli. - (unless (fboundp 'open-gnutls-stream) - (proto-stream-get-response - stream start (proto-stream-eoc parameters)) - (goto-char (point-min)) - (when (re-search-forward (proto-stream-eoc parameters) nil t) - (goto-char (match-beginning 0)) - (delete-region (point-min) (line-beginning-position)))) - (proto-stream-capability-open start stream parameters)))) + (if (null stream) + nil + ;; If we're using tls.el, we have to delete the output from + ;; openssl/gnutls-cli. + (unless (fboundp 'open-gnutls-stream) + (proto-stream-get-response + stream start (proto-stream-eoc parameters)) + (goto-char (point-min)) + (when (re-search-forward (proto-stream-eoc parameters) nil t) + (goto-char (match-beginning 0)) + (delete-region (point-min) (line-beginning-position)))) + (proto-stream-capability-open start stream parameters))))) (defun proto-stream-open-shell (name buffer host service parameters) (proto-stream-capability-open |