From: Timo Sirainen Date: Thu, 8 Oct 2009 00:43:28 +0000 (-0400) Subject: ssl-params: Track client connection count correctly. X-Git-Tag: 2.0.alpha1~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b340a34da607752416e062b9600561bbc29f72de;p=thirdparty%2Fdovecot%2Fcore.git ssl-params: Track client connection count correctly. --HG-- branch : HEAD --- diff --git a/src/ssl-params/main.c b/src/ssl-params/main.c index e947fe87c2..dbbeafa33f 100644 --- a/src/ssl-params/main.c +++ b/src/ssl-params/main.c @@ -23,6 +23,12 @@ static ARRAY_DEFINE(delayed_fds, int); struct ssl_params *param; static buffer_t *ssl_params; +static void client_deinit(struct ostream *output) +{ + o_stream_destroy(&output); + master_service_client_connection_destroyed(master_service); +} + static int client_output_flush(struct ostream *output) { if (o_stream_flush(output) == 0) { @@ -30,7 +36,7 @@ static int client_output_flush(struct ostream *output) return 0; } /* finished / disconnected */ - o_stream_destroy(&output); + client_deinit(output); return -1; } @@ -42,7 +48,7 @@ static void client_handle(int fd) o_stream_send(output, ssl_params->data, ssl_params->used); if (o_stream_get_buffer_used_size(output) == 0) - o_stream_destroy(&output); + client_deinit(output); else { o_stream_set_flush_callback(output, client_output_flush, output);