]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/result.c
Add a safety check to bvcasechr
[openldap] / servers / slapd / result.c
index c79f848d88c4e7278f887796cb93450c48182bc5..228d4efdc4f666e39cae25e8f30820896a9f4fa4 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "slap.h"
 
-static char *v2ref( BVarray ref, const char *text )
+static char *v2ref( BerVarray ref, const char *text )
 {
        size_t len = 0, i = 0;
        char *v2;
@@ -175,7 +175,7 @@ send_ldap_response(
     ber_int_t  err,
     const char *matched,
     const char *text,
-       BVarray ref,
+       BerVarray       ref,
        const char      *resoid,
        struct berval   *resdata,
        struct berval   *sasldata,
@@ -187,8 +187,8 @@ send_ldap_response(
        int             rc;
        long    bytes;
 
-       if (op->o_response) {
-               op->o_response( conn, op, tag, msgid, err, matched,
+       if (op->o_callback && op->o_callback->sc_response) {
+               op->o_callback->sc_response( conn, op, tag, msgid, err, matched,
                        text, ref, resoid, resdata, sasldata, ctrls );
                return;
        }
@@ -381,7 +381,7 @@ send_ldap_result(
     ber_int_t  err,
     const char *matched,
     const char *text,
-       BVarray ref,
+       BerVarray ref,
        LDAPControl **ctrls
 )
 {
@@ -465,7 +465,7 @@ send_ldap_sasl(
     ber_int_t  err,
     const char *matched,
     const char *text,
-       BVarray ref,
+       BerVarray ref,
        LDAPControl **ctrls,
        struct berval *cred
 )
@@ -498,7 +498,7 @@ send_ldap_extended(
     ber_int_t  err,
     const char *matched,
     const char *text,
-    BVarray    refs,
+    BerVarray  refs,
     const char         *rspoid,
        struct berval *rspdata,
        LDAPControl **ctrls
@@ -537,7 +537,7 @@ send_search_result(
     ber_int_t  err,
     const char *matched,
        const char      *text,
-    BVarray    refs,
+    BerVarray  refs,
        LDAPControl **ctrls,
     int                nentries
 )
@@ -548,8 +548,8 @@ send_search_result(
 
        assert( !LDAP_API_ERROR( err ) );
 
-       if (op->o_sresult) {
-               op->o_sresult(conn, op, err, matched, text, refs,
+       if (op->o_callback && op->o_callback->sc_sresult) {
+               op->o_callback->sc_sresult(conn, op, err, matched, text, refs,
                        ctrls, nentries);
                return;
        }
@@ -631,6 +631,11 @@ send_search_entry(
 
        AttributeDescription *ad_entry = slap_schema.si_ad_entry;
 
+       if (op->o_callback && op->o_callback->sc_sendentry) {
+               return op->o_callback->sc_sendentry( be, conn, op, e, attrs,
+                       attrsonly, ctrls );
+       }
+
 #ifdef NEW_LOGGING
        LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
                   "send_search_entry: conn %d  dn=\"%s\"%s\n",
@@ -997,9 +1002,9 @@ send_search_reference(
     Connection *conn,
     Operation  *op,
     Entry      *e,
-       BVarray refs,
+       BerVarray refs,
        LDAPControl **ctrls,
-    BVarray *v2refs
+    BerVarray *v2refs
 )
 {
        char            berbuf[256];