Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2b216704
Commit
2b216704
authored
Jul 03, 2011
by
Lars Magne Ingebrigtsen
Browse files
Add :end-of-capability keyword for use by pop3.el.
parent
1ca0da0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
lisp/ChangeLog
lisp/ChangeLog
+10
-0
lisp/net/network-stream.el
lisp/net/network-stream.el
+13
-4
No files found.
lisp/ChangeLog
View file @
2b216704
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/network-stream.el (open-network-stream): Use the
:end-of-capability command thoughout.
2011-07-03 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
* net/network-stream.el (open-network-stream): Add the
:end-of-capability command parameter, used by pop3.el.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired.el (dired-map-over-marks): Refill the doc string (bug#6814).
...
...
lisp/net/network-stream.el
View file @
2b216704
...
...
@@ -98,6 +98,10 @@ values:
:end-of-command specifies a regexp matching the end of a command.
:end-of-capability specifies a regexp matching the end of the
response to the command specified for :capability-command.
It defaults to the regexp specified for :end-of-command.
:success specifies a regexp matching a message indicating a
successful STARTTLS negotiation. For instance, the default
should be \"^3\" for an NNTP connection.
...
...
@@ -203,11 +207,14 @@ functionality.
(
success-string
(
plist-get
parameters
:success
))
(
capability-command
(
plist-get
parameters
:capability-command
))
(
eoc
(
plist-get
parameters
:end-of-command
))
(
eo-capa
(
or
(
plist-get
parameters
:end-of-capability
)
eoc
))
;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE)
(
stream
(
make-network-process
:name
name
:buffer
buffer
:host
host
:service
service
))
(
greeting
(
network-stream-get-response
stream
start
eoc
))
(
capabilities
(
network-stream-command
stream
capability-command
eoc
))
(
capabilities
(
network-stream-command
stream
capability-command
eo-capa
))
(
resulting-type
'plain
)
(
builtin-starttls
(
and
(
fboundp
'gnutls-available-p
)
(
gnutls-available-p
)))
...
...
@@ -250,7 +257,7 @@ functionality.
;; Requery capabilities for protocols that require it; i.e.,
;; EHLO for SMTP.
(
when
(
plist-get
parameters
:always-query-capabilities
)
(
network-stream-command
stream
capability-command
eo
c
)))
(
network-stream-command
stream
capability-command
eo
-capa
)))
(
when
(
string-match
success-string
(
network-stream-command
stream
starttls-command
eoc
))
;; The server said it was OK to begin STARTTLS negotiations.
...
...
@@ -271,7 +278,7 @@ functionality.
(
network-stream-get-response
stream
start
eoc
)))
;; Re-get the capabilities, which may have now changed.
(
setq
capabilities
(
network-stream-command
stream
capability-command
eo
c
))))
(
network-stream-command
stream
capability-command
eo
-capa
))))
;; If TLS is mandatory, close the connection if it's unencrypted.
(
when
(
and
(
or
require-tls
...
...
@@ -353,7 +360,9 @@ functionality.
?p
service
))))))
(
list
stream
(
network-stream-get-response
stream
start
eoc
)
(
network-stream-command
stream
capability-command
eoc
)
(
network-stream-command
stream
capability-command
(
or
(
plist-get
parameters
:end-of-capability
)
eoc
))
'plain
)))
(
provide
'network-stream
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment