From 58c637479d18f3b1aa156cee9f952659874c844b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 3 Apr 2004 12:15:33 +0000 Subject: [PATCH] return error code only if required (ITS#3042) --- servers/slapd/back-meta/compare.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/compare.c b/servers/slapd/back-meta/compare.c index 4f0d06548f..30314eb9f6 100644 --- a/servers/slapd/back-meta/compare.c +++ b/servers/slapd/back-meta/compare.c @@ -258,7 +258,9 @@ finish:; ldap_back_dn_massage( &dc, &matched, &mmatch ); } - rs->sr_err = rres; + if ( rres != LDAP_SUCCESS ) { + rs->sr_err = rres; + } rs->sr_matched = mmatch.bv_val; send_ldap_result( op, rs ); rs->sr_matched = NULL; -- 2.39.5