return rc;
}
+static int
+glue_back_sendreference (
+ BackendDB *be,
+ Connection *c,
+ Operation *op,
+ Entry *e,
+ BerVarray bv,
+ LDAPControl **ctrls,
+ BerVarray *v2
+)
+{
+ slap_callback *tmp = op->o_callback;
+ glue_state *gs = tmp->sc_private;
+ int rc;
+
+ op->o_callback = gs->prevcb;
+ if (op->o_callback && op->o_callback->sc_sendreference) {
+ rc = op->o_callback->sc_sendreference( be, c, op, e, bv, ctrls, v2 );
+ } else {
+ rc = send_search_reference( be, c, op, e, bv, ctrls, v2 );
+ }
+ op->o_callback = tmp;
+ return rc;
+}
+
static int
glue_back_search (
BackendDB *b0,
LDAP_SLAPD_F (int) slap_sasl_setpolicy LDAP_P(( const char * ));
LDAP_SLAPD_F (slap_response) slap_cb_null_response;
LDAP_SLAPD_F (slap_sresult) slap_cb_null_sresult;
+LDAP_SLAPD_F (slap_sendreference) slap_cb_null_sreference;
/*
AttributeDescription *ad_ref = slap_schema.si_ad_ref;
AttributeDescription *ad_entry = slap_schema.si_ad_entry;
+ if (op->o_callback && op->o_callback->sc_sendreference) {
+ return op->o_callback->sc_sendreference( be, conn, op, e, refs, ctrls, v2refs );
+ }
+
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ENTRY,
"send_search_reference: conn %lu dn=\"%s\"\n",
{
}
+int slap_cb_null_sreference( BackendDB *db, Connection *conn, Operation *o,
+ Entry *e, BerVarray r, LDAPControl **c, BerVarray *v2)
+{
+ return 0;
+}
+
/* This callback actually does some work...*/
static int sasl_sc_sasl2dn( BackendDB *be, Connection *conn, Operation *o,
Entry *e, AttributeName *an, int ao, LDAPControl **c)
int scope = LDAP_SCOPE_BASE;
Filter *filter = NULL;
slap_callback cb = { slap_cb_null_response,
- slap_cb_null_sresult, sasl_sc_sasl2dn, NULL};
+ slap_cb_null_sresult, sasl_sc_sasl2dn, slap_cb_null_sreference, NULL};
Operation op = {0};
struct berval regout = { 0, NULL };
typedef int (slap_sendentry)( BackendDB *, struct slap_conn *,
struct slap_op *, Entry *, AttributeName *, int, LDAPControl **);
+typedef int (slap_sendreference)( BackendDB *, struct slap_conn *,
+ struct slap_op *, Entry *, BerVarray, LDAPControl **, BerVarray * );
+
typedef struct slap_callback {
slap_response *sc_response;
slap_sresult *sc_sresult;
slap_sendentry *sc_sendentry;
+ slap_sendreference *sc_sendreference;
void *sc_private;
} slap_callback;
void *c_pb; /* Netscape plugin */
- /*
+ /*
* These are the "callbacks" that are available for back-ends to
* supply data back to connected clients that are connected
* through the "front-end".
- */
+ */
SEND_LDAP_RESULT c_send_ldap_result;
SEND_SEARCH_ENTRY c_send_search_entry;
SEND_SEARCH_RESULT c_send_search_result;