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 );
}
}
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