]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backglue.c
switch to openldap-data directory
[openldap] / servers / slapd / backglue.c
index 2a5bef23b3719819fb5a334340a0991a587191eb..61bdf574d53f9ff4fe0e3abf80dabb9f8ec6255c 100644 (file)
@@ -36,7 +36,7 @@
 
 typedef struct gluenode {
        BackendDB *be;
-       char *pdn;
+       struct berval pdn;
 } gluenode;
 
 typedef struct glueinfo {
@@ -169,7 +169,7 @@ typedef struct glue_state {
        int matchlen;
        char *matched;
        int nrefs;
-       BVarray refs;
+       BerVarray refs;
        slap_callback *prevcb;
 } glue_state;
 
@@ -182,7 +182,7 @@ glue_back_response (
        ber_int_t err,
        const char *matched,
        const char *text,
-       BVarray ref,
+       BerVarray ref,
        const char *resoid,
        struct berval *resdata,
        struct berval *sasldata,
@@ -209,7 +209,7 @@ glue_back_response (
        }
        if (ref) {
                int i, j, k;
-               BVarray new;
+               BerVarray new;
 
                for (i=0; ref[i].bv_val; i++);
 
@@ -236,7 +236,7 @@ glue_back_sresult (
        ber_int_t err,
        const char *matched,
        const char *text,
-       BVarray refs,
+       BerVarray refs,
        LDAPControl **ctrls,
        int nentries
 )
@@ -352,7 +352,7 @@ glue_back_search (
                        }
                        be = gi->n[i].be;
                        if (scope == LDAP_SCOPE_ONELEVEL && 
-                               !strcmp (gi->n[i].pdn, ndn->bv_val)) {
+                               dn_match(&gi->n[i].pdn, ndn)) {
                                rc = be->be_search (be, conn, op,
                                        be->be_suffix[0], be->be_nsuffix[0],
                                        LDAP_SCOPE_BASE, deref,
@@ -385,7 +385,7 @@ done:
        if (gs.matched)
                free (gs.matched);
        if (gs.refs)
-               bvarray_free(gs.refs);
+               ber_bvarray_free(gs.refs);
        return rc;
 }
 
@@ -600,7 +600,7 @@ glue_back_attribute (
        Entry *target,
        struct berval *ndn,
        AttributeDescription *ad,
-       BVarray *vals
+       BerVarray *vals
 )
 {
        BackendDB *be;
@@ -884,8 +884,7 @@ glue_sub_init( )
                                        gi->nodes * sizeof(gluenode));
                        }
                        gi->n[gi->nodes].be = be;
-                       gi->n[gi->nodes].pdn = dn_parent(NULL,
-                               be->be_nsuffix[0]->bv_val);
+                       dnParent( be->be_nsuffix[0], &gi->n[gi->nodes].pdn ); 
                        gi->nodes++;
                }
                if (gi) {
@@ -893,8 +892,7 @@ glue_sub_init( )
                        gi = (glueinfo *)ch_realloc(gi,
                                sizeof(glueinfo) + gi->nodes * sizeof(gluenode));
                        gi->n[gi->nodes].be = gi->be;
-                       gi->n[gi->nodes].pdn = dn_parent(NULL,
-                               b1->be_nsuffix[0]->bv_val);
+                       dnParent( b1->be_nsuffix[0], &gi->n[gi->nodes].pdn );
                        gi->nodes++;
                        b1->be_private = gi;
                        b1->bd_info = bi;