dovecot-2.0-sslstream: lmtp proxy: Crashfix on hanging connections.

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:43 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/04b0ee571f47
changeset: 10403:04b0ee571f47
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 24 16:40:50 2009 -0500
description:
lmtp proxy: Crashfix on hanging connections.

diffstat:

1 file changed, 4 insertions(+)
src/lmtp/lmtp-proxy.c |    4 ++++

diffs (21 lines):

diff -r 99e069c98709 -r 04b0ee571f47 src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c	Tue Nov 24 15:36:30 2009 -0500
+++ b/src/lmtp/lmtp-proxy.c	Tue Nov 24 16:40:50 2009 -0500
@@ -285,6 +285,8 @@ static size_t lmtp_proxy_find_max_data_i
 
 	conns = array_get(&proxy->connections, &count);
 	for (i = 0; i < count; i++) {
+		if (conns[i]->data_input == NULL)
+			continue;
 		(void)i_stream_get_data(conns[i]->data_input, &size);
 		if (max_size < size)
 			max_size = size;
@@ -306,6 +308,8 @@ static bool lmtp_proxy_disconnect_hangin
 	   more input. */
 	conns = array_get(&proxy->connections, &count);
 	for (i = 0; i < count; i++) {
+		if (conns[i]->data_input == NULL)
+			continue;
 		(void)i_stream_get_data(conns[i]->data_input, &size);
 		if (size == max_size) {
 			lmtp_client_fail(conns[i]->client,


More information about the dovecot-cvs mailing list