dovecot-2.0: lmtp: Improved "DATA output timeout" error message.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Sep 8 13:41:32 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/8de8752b2e94
changeset: 12902:8de8752b2e94
user: Timo Sirainen <tss at iki.fi>
date: Thu Sep 08 13:41:20 2011 +0300
description:
lmtp: Improved "DATA output timeout" error message.
diffstat:
src/lmtp/lmtp-proxy.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 323ab62983b6 -r 8de8752b2e94 src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c Thu Sep 08 11:51:18 2011 +0300
+++ b/src/lmtp/lmtp-proxy.c Thu Sep 08 13:41:20 2011 +0300
@@ -336,6 +336,8 @@
{
struct lmtp_proxy_connection *const *conns;
uoff_t min_offset;
+ size_t size;
+ const char *errstr;
min_offset = lmtp_proxy_find_lowest_offset(proxy);
if (min_offset == (uoff_t)-1)
@@ -348,9 +350,13 @@
if (conn->data_input != NULL &&
conn->data_input->v_offset == min_offset) {
- lmtp_client_fail(conn->client,
- ERRSTR_TEMP_REMOTE_FAILURE
- " (DATA output timeout)");
+ (void)i_stream_get_data(conn->data_input, &size);
+ errstr = t_strdup_printf(ERRSTR_TEMP_REMOTE_FAILURE
+ " (DATA output stalled for %u secs, "
+ "%"PRIuUOFF_T"B sent, %"PRIuSIZE_T"B buffered)",
+ proxy->max_timeout_msecs/1000,
+ min_offset, size);
+ lmtp_client_fail(conn->client, errstr);
}
}
return TRUE;
More information about the dovecot-cvs
mailing list