Skip to content
Snippets Groups Projects
Commit 584d58e8 authored by Howard Chu's avatar Howard Chu
Browse files

Added callbacks for send_ldap_response and send_search_result.

parent 21c5674d
Branches
Tags
No related merge requests found
......@@ -189,6 +189,10 @@ send_ldap_response(
assert( ctrls == NULL ); /* ctrls not implemented */
if (op->o_response)
return op->o_response( conn, op, tag, msgid, err, matched,
text, ref, resoid, resdata, sasldata, ctrls);
ber = ber_alloc_t( LBER_USE_DER );
#ifdef NEW_LOGGING
......@@ -554,6 +558,10 @@ send_search_result(
char *tmp = NULL;
assert( !LDAP_API_ERROR( err ) );
if (op->o_sresult)
return op->o_sresult(conn, op, err, matched, text, refs,
ctrls, nentries);
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
"send_search_result: conn %d err=%d matched=\"%s\"\n",
......
......@@ -1176,6 +1176,17 @@ struct slap_backend_info {
#define o_tls_ssf o_authz.sai_tls_ssf
#define o_sasl_ssf o_authz.sai_sasl_ssf
struct slap_op;
struct slap_conn;
typedef void (slap_response)(struct slap_conn *, struct slap_op *, ber_tag_t,
ber_int_t, ber_int_t, const char *, const char *, struct berval **,
const char *, struct berval *, struct berval *, LDAPControl **);
typedef void (slap_sresult)(struct slap_conn *, struct slap_op *, ber_int_t,
const char *, const char *, struct berval **, LDAPControl **,
int nentries);
/*
* represents an operation pending from an ldap client
*/
......@@ -1203,9 +1214,12 @@ typedef struct slap_op {
ldap_pvt_thread_mutex_t o_abandonmutex; /* protects o_abandon */
int o_abandon; /* abandon flag */
slap_response *o_response; /* callback function */
slap_sresult *o_sresult; /* search result callback */
struct slap_op *o_next; /* next operation in list */
void *o_private; /* anything the backend needs */
void *o_glue; /* for the glue backend */
} Operation;
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment