diff options
| author | Lars Ingebrigtsen | 2011-02-06 22:27:28 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-02-06 22:27:28 +0000 |
| commit | 76b8d9dd0ed6811c0fc1bbde5d9e3b0cf6c61cf1 (patch) | |
| tree | aa7146a9e12a219b55b296833497e8ff6854babc | |
| parent | e765a388299ce398f7f5cf57bc74b8134d785f43 (diff) | |
| download | emacs-76b8d9dd0ed6811c0fc1bbde5d9e3b0cf6c61cf1.tar.gz emacs-76b8d9dd0ed6811c0fc1bbde5d9e3b0cf6c61cf1.zip | |
nntp.el (nntp-finish-retrieve-group-infos): Protect against the first part not returning any data.
proto-stream.el (open-protocol-stream): Document the return value.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/proto-stream.el | 10 |
3 files changed, 20 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7571016a8cb..1ff45b69c2b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-02-06 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * nntp.el (nntp-finish-retrieve-group-infos): Protect against the first | ||
| 4 | part not returning any data. | ||
| 5 | |||
| 6 | * proto-stream.el (open-protocol-stream): Document the return value. | ||
| 7 | |||
| 1 | 2011-02-06 Julien Danjou <julien@danjou.info> | 8 | 2011-02-06 Julien Danjou <julien@danjou.info> |
| 2 | 9 | ||
| 3 | * message.el (message-setup-1): Handle message-generate-headers-first | 10 | * message.el (message-setup-1): Handle message-generate-headers-first |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index cae0150dd17..0e009b2068b 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -781,7 +781,8 @@ command whose response triggered the error." | |||
| 781 | ;; The first time this is run, this variable is `try'. So we | 781 | ;; The first time this is run, this variable is `try'. So we |
| 782 | ;; try. | 782 | ;; try. |
| 783 | (when (eq nntp-server-list-active-group 'try) | 783 | (when (eq nntp-server-list-active-group 'try) |
| 784 | (nntp-try-list-active (gnus-group-real-name (gnus-info-group (car infos))))) | 784 | (nntp-try-list-active |
| 785 | (gnus-group-real-name (gnus-info-group (car infos))))) | ||
| 785 | (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer) | 786 | (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer) |
| 786 | (erase-buffer) | 787 | (erase-buffer) |
| 787 | (let ((nntp-inhibit-erase t) | 788 | (let ((nntp-inhibit-erase t) |
| @@ -800,7 +801,8 @@ command whose response triggered the error." | |||
| 800 | (car infos))) | 801 | (car infos))) |
| 801 | (received 0) | 802 | (received 0) |
| 802 | (last-point 1)) | 803 | (last-point 1)) |
| 803 | (when buf | 804 | (when (and buf |
| 805 | count) | ||
| 804 | (with-current-buffer buf | 806 | (with-current-buffer buf |
| 805 | (while (and (gnus-buffer-live-p buf) | 807 | (while (and (gnus-buffer-live-p buf) |
| 806 | (progn | 808 | (progn |
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index 9117ac9f4e3..fdf2abfea05 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el | |||
| @@ -94,7 +94,15 @@ query server for capabilities. For instance, for IMAP this is | |||
| 94 | :starttls-function -- a function that takes one parameter, which | 94 | :starttls-function -- a function that takes one parameter, which |
| 95 | is the response to the capaibility command. It should return nil | 95 | is the response to the capaibility command. It should return nil |
| 96 | if it turns out that the server doesn't support STARTTLS, or the | 96 | if it turns out that the server doesn't support STARTTLS, or the |
| 97 | command to switch on STARTTLS otherwise." | 97 | command to switch on STARTTLS otherwise. |
| 98 | |||
| 99 | The return value from this function is a four-element list, where | ||
| 100 | the first element is the stream (if connection was successful); | ||
| 101 | the second element is the \"greeting\", i. e., the string the | ||
| 102 | server sent over on initial contact; the third element is the | ||
| 103 | capability string; and the fourth element is either `network' or | ||
| 104 | `tls', depending on whether the connection ended up being | ||
| 105 | encrypted or not." | ||
| 98 | (let ((type (or (cadr (memq :type parameters)) 'network))) | 106 | (let ((type (or (cadr (memq :type parameters)) 'network))) |
| 99 | (cond | 107 | (cond |
| 100 | ((eq type 'starttls) | 108 | ((eq type 'starttls) |