From 3f1ab56fa987090f16c27d71d6bc6f1ece048d0c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 7 Dec 2001 22:28:46 +0000 Subject: [PATCH] Fix reference scope. --- servers/slapd/back-ldbm/search.c | 6 ++++-- servers/slapd/result.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 365f7f8ea3..2f83a48288 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -401,8 +401,10 @@ searchit: if( scopeok ) { struct berval **erefs = get_entry_referrals( be, conn, op, e, NULL, cscope ); - struct berval **refs = referral_rewrite( erefs, e->e_dn, - NULL, scope ); + struct berval **refs = referral_rewrite( erefs, e->e_dn, NULL, + scope == LDAP_SCOPE_SUBTREE + ? LDAP_SCOPE_SUBTREE + : LDAP_SCOPE_BASE ); send_search_reference( be, conn, op, e, refs, NULL, &v2refs ); diff --git a/servers/slapd/result.c b/servers/slapd/result.c index c71972fe50..06d4c73795 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -688,7 +688,7 @@ send_search_entry( } } if (conn->c_is_udp && op->o_protocol == LDAP_VERSION2) { - rc = ber_printf( ber, "{is{t{s{", + rc = ber_printf( ber, "{is{t{s{" /*}}}*/, op->o_msgid, "", LDAP_RES_SEARCH_ENTRY, e->e_dn ); } else #endif -- 2.39.5