[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104600: (open-network-stream): Add t
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104600: (open-network-stream): Add the keyword :always-query-capabilities. |
Date: |
Wed, 15 Jun 2011 22:44:45 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104600
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2011-06-15 22:44:45 +0200
message:
(open-network-stream): Add the keyword :always-query-capabilities.
This is for the case where you want to force a `plain' network
connection, but the protocol still requires the capabilitiy command
(i.e., SMTP and EHLO).
modified:
lisp/ChangeLog
lisp/net/network-stream.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-06-15 18:40:00 +0000
+++ b/lisp/ChangeLog 2011-06-15 20:44:45 +0000
@@ -14,6 +14,11 @@
2011-06-15 Lars Magne Ingebrigtsen <address@hidden>
+ * net/network-stream.el (open-network-stream): Add the keyword
+ :always-query-capabilities for the case where you want to force a
+ `plain' network connection, but the protocol still requires the
+ capabilitiy command (i.e., SMTP and EHLO).
+
* subr.el (process-live-p): Rename from `process-alive-p' for
consistency with other `-live-p' functions.
=== modified file 'lisp/net/network-stream.el'
--- a/lisp/net/network-stream.el 2011-05-05 06:35:41 +0000
+++ b/lisp/net/network-stream.el 2011-06-15 20:44:45 +0000
@@ -109,6 +109,9 @@
capability command, and should return the command to switch on
STARTTLS if the server supports STARTTLS, and nil otherwise.
+:always-query-capabilies says whether to query the server for
+capabilities, even if we're doing a `plain' network connection.
+
:nowait is a boolean that says the connection should be made
asynchronously, if possible."
(unless (featurep 'make-network-process)
@@ -126,8 +129,11 @@
:nowait (plist-get parameters :nowait))
(let ((work-buffer (or buffer
(generate-new-buffer " *stream buffer*")))
- (fun (cond ((eq type 'plain) 'network-stream-open-plain)
- ((memq type '(nil network starttls))
+ (fun (cond ((and (eq type 'plain)
+ (not (plist-get parameters
+ :always-query-capabilities)))
+ 'network-stream-open-plain)
+ ((memq type '(nil network starttls plain))
'network-stream-open-starttls)
((memq type '(tls ssl)) 'network-stream-open-tls)
((eq type 'shell) 'network-stream-open-shell)
@@ -182,7 +188,8 @@
(executable-find "gnutls-cli")))
capabilities success-string starttls-function
(setq starttls-command
- (funcall starttls-function capabilities)))
+ (funcall starttls-function capabilities))
+ (not (eq (plist-get parameters :type) 'plain)))
;; If using external STARTTLS, drop this connection and start
;; anew with `starttls-open-stream'.
(unless (fboundp 'open-gnutls-stream)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104600: (open-network-stream): Add the keyword :always-query-capabilities.,
Lars Magne Ingebrigtsen <=