dovecot: auth_debug: If LDAP server returned no fields, log it.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 31 17:06:21 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/ace71babd1ec
changeset: 7202:ace71babd1ec
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 31 17:06:18 2008 +0200
description:
auth_debug: If LDAP server returned no fields, log it.

diffstat:

1 file changed, 8 insertions(+), 3 deletions(-)
src/auth/db-ldap.c |   11 ++++++++---

diffs (21 lines):

diff -r 52639b885d87 -r ace71babd1ec src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Wed Jan 30 18:41:37 2008 +0200
+++ b/src/auth/db-ldap.c	Thu Jan 31 17:06:18 2008 +0200
@@ -968,9 +968,14 @@ static void
 static void
 db_ldap_result_iterate_finish(struct db_ldap_result_iterate_context *ctx)
 {
-	if (ctx->debug != NULL && str_len(ctx->debug) > 0) {
-		auth_request_log_debug(ctx->auth_request, "ldap",
-				       "result: %s", str_c(ctx->debug) + 1);
+	if (ctx->debug != NULL) {
+		if (str_len(ctx->debug) > 0) {
+			auth_request_log_debug(ctx->auth_request, "ldap",
+				"result: %s", str_c(ctx->debug) + 1);
+		} else {
+			auth_request_log_debug(ctx->auth_request, "ldap",
+				"no fields returned by the server");
+		}
 	}
 
 	ber_free(ctx->ber, 0);


More information about the dovecot-cvs mailing list