[gnus git] branch master updated: =1= (open-protocol-stream): Protect against the low-level transport functions returning nil.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  68bab3816a03f315ca498b3174a4803e09f63c55 (commit)
      from  99fcbbcc7ae5522e7cd21833f8ce2eedc74a1a64 (commit)


- Log -----------------------------------------------------------------
commit 68bab3816a03f315ca498b3174a4803e09f63c55
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Jan 11 18:16:47 2011 +0100

    (open-protocol-stream): Protect against the low-level transport functions returning nil.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 47c7a4a..e56e923 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-11  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* proto-stream.el (open-protocol-stream): Protect against the low-level
+	transport functions returning nil.
+
 2011-01-07  Daiki Ueno  <[email protected]>
 
 	* mml2015.el (epg-sub-key-fingerprint): Autoload.
diff --git a/lisp/proto-stream.el b/lisp/proto-stream.el
index d1266cb..546461a 100644
--- a/lisp/proto-stream.el
+++ b/lisp/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 <[email protected]>
 ;; 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)
+    (let ((open-result
 	(funcall (intern (format "proto-stream-open-%s" type) obarray)
-		 name buffer host service parameters)
+		    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))))
+		greeting capabilities))))))
 
 (defun proto-stream-open-network-only (name buffer host service parameters)
   (let ((start (with-current-buffer buffer (point)))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog       |    5 +++++
 lisp/proto-stream.el |   21 ++++++++++++---------
 2 files changed, 17 insertions(+), 9 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.