dovecot-2.2: istream-chain: Removed default get_size() implement...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 28 22:16:16 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/bb0533bca649
changeset: 14962:bb0533bca649
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 28 22:15:57 2012 +0300
description:
istream-chain: Removed default get_size() implementation and panicing on stat()
This works around crashes in mdbox/quota code.
Patch by Stephan Bosch.

diffstat:

 src/lib/istream-chain.c |  12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diffs (33 lines):

diff -r cbe8fe1b44f0 -r bb0533bca649 src/lib/istream-chain.c
--- a/src/lib/istream-chain.c	Tue Aug 28 22:15:49 2012 +0300
+++ b/src/lib/istream-chain.c	Tue Aug 28 22:15:57 2012 +0300
@@ -237,20 +237,11 @@
 
 static const struct stat *
 i_stream_chain_stat(struct istream_private *stream ATTR_UNUSED,
-		    bool exact ATTR_UNUSED)
+	bool exact ATTR_UNUSED)
 {
-	i_panic("istream_chain(): stat() not supported");
 	return NULL;
 }
 
-static int
-i_stream_chain_get_size(struct istream_private *stream ATTR_UNUSED,
-			bool exact ATTR_UNUSED, uoff_t *size_r ATTR_UNUSED)
-{
-	i_panic("istream_chain(): get_size() not supported");
-	return -1;
-}
-
 struct istream *i_stream_create_chain(struct istream_chain **chain_r)
 {
 	struct chain_istream *cstream;
@@ -265,7 +256,6 @@
 
 	cstream->istream.read = i_stream_chain_read;
 	cstream->istream.stat = i_stream_chain_stat;
-	cstream->istream.get_size = i_stream_chain_get_size;
 
 	cstream->istream.istream.readable_fd = FALSE;
 	cstream->istream.istream.blocking = FALSE;


More information about the dovecot-cvs mailing list