dovecot-2.2: auth: Avoid wasting data stack when iterating users.

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 12 01:57:50 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/7172b893101d
changeset: 16608:7172b893101d
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jul 12 01:57:45 2013 +0300
description:
auth: Avoid wasting data stack when iterating users.

diffstat:

 src/auth/auth-worker-client.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r a97caa1ce2b7 -r 7172b893101d src/auth/auth-worker-client.c
--- a/src/auth/auth-worker-client.c	Fri Jul 12 01:39:47 2013 +0300
+++ b/src/auth/auth-worker-client.c	Fri Jul 12 01:57:45 2013 +0300
@@ -455,8 +455,10 @@
 	do {
 		ctx->sending = TRUE;
 		ctx->sent = FALSE;
-		ctx->auth_request->userdb->userdb->iface->
-			iterate_next(ctx->iter);
+		T_BEGIN {
+			ctx->auth_request->userdb->userdb->iface->
+				iterate_next(ctx->iter);
+		} T_END;
 	} while (ctx->sent &&
 		 o_stream_get_buffer_used_size(ctx->client->output) == 0);
 	ctx->sending = FALSE;
@@ -472,10 +474,10 @@
 		list_iter_deinit(ctx);
 		return 1;
 	}
-	if (ret > 0) {
+	if (ret > 0) T_BEGIN {
 		ctx->auth_request->userdb->userdb->iface->
 			iterate_next(ctx->iter);
-	}
+	} T_END;
 	return 1;
 }
 


More information about the dovecot-cvs mailing list