summaryrefslogtreecommitdiff
path: root/lisp/gnus/proto-stream.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-01-11 23:32:50 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-01-11 23:32:50 +0000
commitc516cd6dc7cec75a4a979f85c090f7f279eef3eb (patch)
tree3a6afccf3072f9f0c2c577d395e9c64df446f53a /lisp/gnus/proto-stream.el
parentf853f59905cce4c7b2dc442ff5da1a10769730b0 (diff)
downloademacs-c516cd6dc7cec75a4a979f85c090f7f279eef3eb.tar.gz
proto-stream.el (open-protocol-stream): Protect against the low-level transport functions returning nil.
gnus-sum.el (gnus-summary-next-article): Remove hack to reselect group window, because it does the wrong thing when a separate frame displays the group buffer. gnus-int.el (gnus-request-accept-article): Don't try to update marks and stuff if the backend didn't return the article number. This fixes an Exchange-related nnimap bug. mm-decode.el (mm-preferred-alternative-precedence): Discourage showing empty parts. nnimap.el (nnimap-convert-partial-article): Protect against zero-length body parts.
Diffstat (limited to 'lisp/gnus/proto-stream.el')
-rw-r--r--lisp/gnus/proto-stream.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el
index d1266cb5461..546461a67b3 100644
--- a/lisp/gnus/proto-stream.el
+++ b/lisp/gnus/proto-stream.el
@@ -1,6 +1,6 @@
;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections
-;; Copyright (C) 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2011 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
@@ -101,14 +101,17 @@ command to switch on STARTTLS otherwise."
(setq type 'network))
((eq type 'ssl)
(setq type 'tls)))
- (destructuring-bind (stream greeting capabilities)
- (funcall (intern (format "proto-stream-open-%s" type) obarray)
- name buffer host service parameters)
- (list (and stream
- (memq (process-status stream)
- '(open run))
- stream)
- greeting capabilities))))
+ (let ((open-result
+ (funcall (intern (format "proto-stream-open-%s" type) obarray)
+ name buffer host service parameters)))
+ (if (null open-result)
+ (list nil nil nil)
+ (destructuring-bind (stream greeting capabilities) open-result
+ (list (and stream
+ (memq (process-status stream)
+ '(open run))
+ stream)
+ greeting capabilities))))))
(defun proto-stream-open-network-only (name buffer host service parameters)
(let ((start (with-current-buffer buffer (point)))