]> git.sur5r.net Git - openldap/commitdiff
Fix reference scope.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 7 Dec 2001 22:28:46 +0000 (22:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 7 Dec 2001 22:28:46 +0000 (22:28 +0000)
servers/slapd/back-ldbm/search.c
servers/slapd/result.c

index 365f7f8ea33a29bf1d1e5889a6fa024fa2d5692a..2f83a482888adf95f365e8403a4cb1f5afd1e5ea 100644 (file)
@@ -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 );
index c71972fe50a3e83212e0594eee245a580033a1e9..06d4c73795d8c4410202fa27b2cbfd52bd6718ce 100644 (file)
@@ -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