dovecot-2.2: lib: If i_stream_default_seek_nonseekable() can't s...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 29 19:44:27 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/ee9cebb11e0e
changeset: 17848:ee9cebb11e0e
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 29 22:43:44 2014 +0300
description:
lib: If i_stream_default_seek_nonseekable() can't seek, set a more readable error message.

diffstat:

 src/lib/istream.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r d7c05be052a3 -r ee9cebb11e0e src/lib/istream.c
--- a/src/lib/istream.c	Mon Sep 29 15:56:02 2014 +0300
+++ b/src/lib/istream.c	Mon Sep 29 22:43:44 2014 +0300
@@ -745,6 +745,11 @@
 
 		available = stream->pos - stream->skip;
 		if (available == 0) {
+			io_stream_set_error(&stream->iostream,
+				"Can't seek to offset %"PRIuUOFF_T
+				", because we have data only up to offset %"
+				PRIuUOFF_T" (eof=%d)", v_offset,
+				stream->istream.v_offset, stream->istream.eof);
 			stream->istream.stream_errno = ESPIPE;
 			return;
 		}


More information about the dovecot-cvs mailing list