dovecot-2.0: ssl-params: Track client connection count correctly.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Oct 8 03:44:00 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/33532261ce0c
changeset: 9993:33532261ce0c
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 07 20:43:28 2009 -0400
description:
ssl-params: Track client connection count correctly.
diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
src/ssl-params/main.c | 10 ++++++++--
diffs (34 lines):
diff -r fb16190aa088 -r 33532261ce0c src/ssl-params/main.c
--- a/src/ssl-params/main.c Wed Oct 07 20:35:37 2009 -0400
+++ b/src/ssl-params/main.c Wed Oct 07 20:43:28 2009 -0400
@@ -23,6 +23,12 @@ struct ssl_params *param;
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 os
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);
More information about the dovecot-cvs
mailing list