From: Kurt Zeilenga Date: Fri, 7 Dec 2001 22:28:46 +0000 (+0000) Subject: Fix reference scope. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~720 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f1ab56fa987090f16c27d71d6bc6f1ece048d0c;p=openldap Fix reference scope. --- 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