]> git.sur5r.net Git - openldap/commitdiff
Fix !ENABLE_REWRITE
authorHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 19:48:10 +0000 (19:48 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 19:48:10 +0000 (19:48 +0000)
servers/slapd/back-ldap/config.c
servers/slapd/back-ldap/init.c
servers/slapd/back-ldap/suffixmassage.c

index d03c1ea08fa08538023dc1a8cedc85dbcd5b95de..7399a3cc026734820830badaa4f4485135dd5735 100644 (file)
@@ -221,11 +221,11 @@ ldap_back_db_config(
                return( rc );
 
 #else /* !ENABLE_REWRITE */
-               ber_bvarray_add( &li->suffix_massage, &pvnc );
-               ber_bvarray_add( &li->suffix_massage, &nvnc );
+               ber_bvarray_add( &li->rwmap.rwm_suffix_massage, &pvnc );
+               ber_bvarray_add( &li->rwmap.rwm_suffix_massage, &nvnc );
                
-               ber_bvarray_add( &li->suffix_massage, &prnc );
-               ber_bvarray_add( &li->suffix_massage, &nrnc );
+               ber_bvarray_add( &li->rwmap.rwm_suffix_massage, &prnc );
+               ber_bvarray_add( &li->rwmap.rwm_suffix_massage, &nrnc );
 #endif /* !ENABLE_REWRITE */
 
        /* rewrite stuff ... */
index e2ccceebf8c5b9f89b64e172b94cad2703e09c92..efa8b88a4e370c0278831446642b42732c1cd0b1 100644 (file)
@@ -197,8 +197,8 @@ ldap_back_db_destroy(
                        rewrite_info_delete( li->rwmap.rwm_rw );
                }
 #else /* !ENABLE_REWRITE */
-               if (li->suffix_massage) {
-                       ber_bvarray_free( li->suffix_massage );
+               if (li->rwmap.rwm_suffix_massage) {
+                       ber_bvarray_free( li->rwmap.rwm_suffix_massage );
                }
 #endif /* !ENABLE_REWRITE */
 
index 5e108b186c41bcb3f94a88ecfe3b9cb5bce05c82..bf3100e82cb528def1fba63b93c229df86477575 100644 (file)
@@ -107,7 +107,7 @@ ldap_back_dn_massage(
                res->bv_len = 0;
                return 0;
        }
-       if ( dc->li == NULL || dc->li->suffix_massage == NULL ) {
+       if ( dc->rwmap == NULL || dc->rwmap->rwm_suffix_massage == NULL ) {
                *res = *dn;
                return 0;
        }
@@ -126,9 +126,9 @@ ldap_back_dn_massage(
        }
 
        for ( i = 0;
-               dc->li->suffix_massage[i].bv_val != NULL;
+               dc->rwmap->rwm_suffix_massage[i].bv_val != NULL;
                i += 4 ) {
-               int aliasLength = dc->li->suffix_massage[i+src].bv_len;
+               int aliasLength = dc->rwmap->rwm_suffix_massage[i+src].bv_len;
                int diff = dn->bv_len - aliasLength;
 
                if ( diff < 0 ) {
@@ -140,11 +140,11 @@ ldap_back_dn_massage(
                        /* At a DN Separator */
                }
 
-               if ( !strcmp( dc->li->suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) {
-                       res->bv_len = diff + dc->li->suffix_massage[i+dst].bv_len;
+               if ( !strcmp( dc->rwmap->rwm_suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) {
+                       res->bv_len = diff + dc->rwmap->rwm_suffix_massage[i+dst].bv_len;
                        res->bv_val = ch_malloc( res->bv_len + 1 );
                        strncpy( res->bv_val, dn->bv_val, diff );
-                       strcpy( &res->bv_val[diff], dc->li->suffix_massage[i+dst].bv_val );
+                       strcpy( &res->bv_val[diff], dc->rwmap->rwm_suffix_massage[i+dst].bv_val );
 #ifdef NEW_LOGGING
                                        LDAP_LOG ( BACK_LDAP, ARGS, 
                                                "ldap_back_dn_massage: converted \"%s\" to \"%s\"\n",