Syntax
#include "slapi-plugin.h" void slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched, char *text, int nentries, struct berval **urls );
Parameters
The function has the following parameters:
Description
Call slapi_send_ldap_result() to send an LDAP result code (such as LDAP_SUCCESS) back to the client.
The following arguments are intended for use only in certain situations:
matched When sending an LDAP_NO_SUCH_OBJECT result code back to a client, use matched to specify how much of the target DN could be found in the database. For example, if the client was attempting to find the DN: cn=Babs Jensen, ou=Product Division, o=Ace Industries, c=US
When sending an LDAP_NO_SUCH_OBJECT result code back to a client, use matched to specify how much of the target DN could be found in the database. For example, if the client was attempting to find the DN:
and the database contains entries for "c=US" and "o=Ace Industries, c=US", but no entry for "ou=Product Division, o=Ace Industries, c=US", you should set the matched parameter to: o=Ace Industries, c=US
and the database contains entries for "c=US" and "o=Ace Industries, c=US", but no entry for "ou=Product Division, o=Ace Industries, c=US", you should set the matched parameter to:
urls When sending an LDAP_PARTIAL_RESULTS result code back to an LDAP v2 client or an LDAP_REFERRAL result code back to an LDAP v3 client, use urls to specify the referral URLs. For LDAP v3 referrals, you can call the slapi_send_ldap_referral() to send referrals to LDAP v3 clients and collect them for LDAP v2 clients. You can pass the array of collected referrals to the urls argument of slapi_send_ldap_results(). For example: struct berval **urls;
When sending an LDAP_PARTIAL_RESULTS result code back to an LDAP v2 client or an LDAP_REFERRAL result code back to an LDAP v3 client, use urls to specify the referral URLs.
For LDAP v3 referrals, you can call the slapi_send_ldap_referral() to send referrals to LDAP v3 clients and collect them for LDAP v2 clients. You can pass the array of collected referrals to the urls argument of slapi_send_ldap_results(). For example:
...
slapi_send_ldap_referral( ld, e, &refs, &urls );
slapi_send_ldap_result( ld, LDAP_PARTIAL_RESULTS, NULL, NULL, 0, urls );
Example
[To be added]
See Also
slapi_send_ldap_referral(), slapi_send_ldap_search_entry().