dovecot-2.2: iostream-temp: Set a name for the returned istream.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Feb 4 22:16:18 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/b94603584655
changeset: 15733:b94603584655
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 04 22:15:59 2013 +0200
description:
iostream-temp: Set a name for the returned istream.
diffstat:
src/lib/iostream-temp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r e4fbb3a834a7 -r b94603584655 src/lib/iostream-temp.c
--- a/src/lib/iostream-temp.c Mon Feb 04 22:07:14 2013 +0200
+++ b/src/lib/iostream-temp.c Mon Feb 04 22:15:59 2013 +0200
@@ -234,16 +234,23 @@
input = i_stream_create_limit(input2, size);
i_stream_unref(&input2);
}
+ i_stream_set_name(input, t_strdup_printf(
+ "(Temp file in %s, from %s)", tstream->temp_path_prefix,
+ i_stream_get_name(tstream->dupstream)));
i_stream_unref(&tstream->dupstream);
} else if (tstream->dupstream != NULL) {
/* return the original failed stream. */
input = tstream->dupstream;
} else if (tstream->fd != -1) {
input = i_stream_create_fd(tstream->fd, max_buffer_size, TRUE);
+ i_stream_set_name(input, t_strdup_printf(
+ "(Temp file in %s)", tstream->temp_path_prefix));
tstream->fd = -1;
} else {
input = i_stream_create_from_data(tstream->buf->data,
tstream->buf->used);
+ i_stream_set_name(input, t_strdup_printf(
+ "(Temp file in %s)", tstream->temp_path_prefix));
i_stream_set_destroy_callback(input, iostream_temp_buf_destroyed,
tstream->buf);
tstream->buf = NULL;
More information about the dovecot-cvs
mailing list