Commit 0d38b2f4 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

Don't mark nnimap articles as read on a server hangup

* lisp/gnus/nnimap.el (nnimap-retrieve-headers): If the server closes connection
during header retrieval, error out instead of interpreting the data in
the buffer as the only messages there.  This way, we don't mark
articles as read on a server hangup (bug#19035).
parent 6090b8f6
2015-02-14 Lars Ingebrigtsen <larsi@gnus.org> 2015-02-14 Lars Ingebrigtsen <larsi@gnus.org>
   
* nnimap.el (nnimap-retrieve-headers): If the server closes connection
during header retrieval, error out instead of interpreting the data in
the buffer as the only messages there. This way, we don't mark
articles as read on a server hangup (bug#19035).
* mm-decode.el (mm-head-p): New function. * mm-decode.el (mm-head-p): New function.
(mm-display-part): Go to a blank line when inserting parts internally. (mm-display-part): Go to a blank line when inserting parts internally.
   
......
...@@ -196,6 +196,8 @@ textual parts.") ...@@ -196,6 +196,8 @@ textual parts.")
(nnimap-article-ranges (gnus-compress-sequence articles)) (nnimap-article-ranges (gnus-compress-sequence articles))
(nnimap-header-parameters)) (nnimap-header-parameters))
t) t)
(unless (process-live-p (get-buffer-process (current-buffer)))
(error "Server closed connection"))
(nnimap-transform-headers) (nnimap-transform-headers)
(nnheader-remove-cr-followed-by-lf)) (nnheader-remove-cr-followed-by-lf))
(insert-buffer-substring (insert-buffer-substring
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment