[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Search result for null backend
carm4000 writes:
> I'd like to have the null backend return me a search result.
>
> This is what I tried :
Well, what happens when you try it?
Anyway,
> entry = str2entry("dn: cn=Barbara Jensen,cn=FOOFOO\ncn: Barbara Jensen\ncn: Babs
> Jensen\nobjectClass: person\nsn: Jensen\n");
This is just a detail, but I'd write that on shorter lines:
entry = str2entry("\
dn: cn=Barbara Jensen,cn=FOOFOO\n\
cn: Barbara Jensen\n\
cn: Babs Jensen\n\
objectClass: person\n\
sn: Jensen\n");
Next, don't crash str2entry() fails - e.g. due to lack of memory:
if( entry == NULL ) {
Debug( LDAP_DEBUG_ANY, "back-null str2entry() failed\n",
0, 0, 0 );
} else {
> refs = get_entry_referrals( be, conn, op, entry );
> send_search_reference( be, conn, op, entry, refs, NULL, &v2refs );
> ber_bvarray_free( refs );
Why do you try to send references? I don't see any references in your
entry.
> sres = send_search_entry( be, conn, op, entry, attrs, attrsonly, NULL );
}
--
Hallvard