[gnus git] branch master updated: m0-11-161-g2b1216b =1= Don't mark nnimap articles as read on a server hangup

Lars <[email protected]> Sat, 14 Feb 2015 06:42:48 +0100
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  2b1216b212947dc91ee6c7990fdbead9f51d670a (commit)
      from  8adead68c4eac297504f95aff5baaa4735de4f2c (commit)


- Log -----------------------------------------------------------------
commit 2b1216b212947dc91ee6c7990fdbead9f51d670a
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Sat Feb 14 16:42:41 2015 +1100

    Don't mark nnimap articles as read on a server hangup
    
    * 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).

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9f93a30..91643d1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-14  Lars Ingebrigtsen  <[email protected]>
 
+	* 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-display-part): Go to a blank line when inserting parts internally.
 
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index e7f91b7..d8b49f7 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -196,6 +196,8 @@ textual parts.")
 	  (nnimap-article-ranges (gnus-compress-sequence articles))
 	  (nnimap-header-parameters))
 	 t)
+	(unless (process-live-p (get-buffer-process (current-buffer)))
+	  (error "Server closed connection")) 
 	(nnimap-transform-headers)
 	(nnheader-remove-cr-followed-by-lf))
       (insert-buffer-substring

-----------------------------------------------------------------------
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/nnimap.el |    2 ++
 2 files changed, 7 insertions(+)

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