summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiner Steib <Reiner.Steib@gmx.de>2008-03-19 21:29:41 +0000
committerReiner Steib <Reiner.Steib@gmx.de>2008-03-19 21:29:41 +0000
commit5c7f3de1b29ce602c740b1cec647ecc11df69313 (patch)
tree3d5e8078d3dfd81fee7e132354067fbd06f57ca7
parent169dcbc59a6be163aa624861eb7e797e69dbc5cd (diff)
downloademacs-5c7f3de1b29ce602c740b1cec647ecc11df69313.tar.gz
(open-tls-stream): Reindent.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/tls.el86
2 files changed, 47 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1ffa5c2f08d..eaa74241064 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-19 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * net/tls.el (open-tls-stream): Reindent.
+
2008-03-19 Glenn Morris <rgm@gnu.org>
* net/tls.el: Don't require rx when compiling.
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index 2b0ee831888..3b96f04ddf7 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -155,49 +155,49 @@ Fourth arg PORT is an integer specifying a port to connect to."
(setq buffer (generate-new-buffer " TLS")))
(with-current-buffer buffer
(message "Opening TLS connection to `%s'..." host)
- (while (and (not done) (setq cmd (pop cmds)))
- (message "Opening TLS connection with `%s'..." cmd)
- (let ((process-connection-type tls-process-connection-type)
- response)
- (setq process (start-process
- name buffer shell-file-name shell-command-switch
- (format-spec
- cmd
- (format-spec-make
- ?h host
- ?p (if (integerp port)
- (int-to-string port)
- port)))))
- (while (and process
- (memq (process-status process) '(open run))
- (progn
- (goto-char (point-min))
- (not (setq done (re-search-forward tls-success nil t)))))
- (unless (accept-process-output process 1)
- (sit-for 1)))
- (message "Opening TLS connection with `%s'...%s" cmd
- (if done "done" "failed"))
- (if (not done)
- (delete-process process)
- ;; advance point to after all informational messages that
- ;; `openssl s_client' and `gnutls' print
- (let ((start-of-data nil))
- (while
- (not (setq start-of-data
- ;; the string matching `tls-end-of-info'
- ;; might come in separate chunks from
- ;; `accept-process-output', so start the
- ;; search where `tls-success' ended
- (save-excursion
- (if (re-search-forward tls-end-of-info nil t)
- (match-end 0)))))
- (accept-process-output process 1))
- (if start-of-data
- ;; move point to start of client data
- (goto-char start-of-data)))
- (setq done process))))
- (message "Opening TLS connection to `%s'...%s"
- host (if done "done" "failed")))
+ (while (and (not done) (setq cmd (pop cmds)))
+ (message "Opening TLS connection with `%s'..." cmd)
+ (let ((process-connection-type tls-process-connection-type)
+ response)
+ (setq process (start-process
+ name buffer shell-file-name shell-command-switch
+ (format-spec
+ cmd
+ (format-spec-make
+ ?h host
+ ?p (if (integerp port)
+ (int-to-string port)
+ port)))))
+ (while (and process
+ (memq (process-status process) '(open run))
+ (progn
+ (goto-char (point-min))
+ (not (setq done (re-search-forward tls-success nil t)))))
+ (unless (accept-process-output process 1)
+ (sit-for 1)))
+ (message "Opening TLS connection with `%s'...%s" cmd
+ (if done "done" "failed"))
+ (if (not done)
+ (delete-process process)
+ ;; advance point to after all informational messages that
+ ;; `openssl s_client' and `gnutls' print
+ (let ((start-of-data nil))
+ (while
+ (not (setq start-of-data
+ ;; the string matching `tls-end-of-info'
+ ;; might come in separate chunks from
+ ;; `accept-process-output', so start the
+ ;; search where `tls-success' ended
+ (save-excursion
+ (if (re-search-forward tls-end-of-info nil t)
+ (match-end 0)))))
+ (accept-process-output process 1))
+ (if start-of-data
+ ;; move point to start of client data
+ (goto-char start-of-data)))
+ (setq done process))))
+ (message "Opening TLS connection to `%s'...%s"
+ host (if done "done" "failed")))
(when use-temp-buffer
(if done (set-process-buffer process nil))
(kill-buffer buffer))