]> git.sur5r.net Git - openldap/commitdiff
#unifdef -DSLAP_NVALUES_ON_DISK
authorKurt Zeilenga <kurt@openldap.org>
Sat, 5 Apr 2003 03:11:29 +0000 (03:11 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 5 Apr 2003 03:11:29 +0000 (03:11 +0000)
servers/slapd/back-bdb/id2entry.c
servers/slapd/entry.c
servers/slapd/slap.h

index 151fbb0ebe0bab4d1248c1fa22bab290eb680b58..21478685de03db4ad9d0337ec1603cea9451c1cf 100644 (file)
@@ -205,18 +205,6 @@ int bdb_entry_return(
        if( (void *) e->e_attrs != (void *) (e+1)) {
                attrs_free( e->e_attrs );
        }
-#if defined(SLAP_NVALUES) && !defined(SLAP_NVALUES_ON_DISK)
-       else {
-               /* nvals are not contiguous with the rest. oh well. */
-               Attribute *a;
-               for (a = e->e_attrs; a; a=a->a_next) {
-                       if (a->a_nvals != a->a_vals) {
-                               ber_bvarray_free( a->a_nvals );
-                               a->a_nvals = NULL;
-                       }
-               }
-       }
-#endif
 
 #ifndef BDB_HIER
        /* See if the DNs were changed by modrdn */
index 745e96a2e90da4c15fdc297d4d439985f6725db6..ca9ed153d7c2daab2ef17beab575ad797c7debc9 100644 (file)
@@ -544,7 +544,7 @@ int entry_encode(Entry *e, struct berval *bv)
                }
                len += entry_lenlen(i);
                siz += sizeof(struct berval);   /* empty berval at end */
-#ifdef SLAP_NVALUES_ON_DISK
+#ifdef SLAP_NVALUES
                if (a->a_nvals != a->a_vals) {
                        for (i=0; a->a_nvals[i].bv_val; i++) {
                                siz += sizeof(struct berval);
@@ -589,7 +589,7 @@ int entry_encode(Entry *e, struct berval *bv)
                        ptr += a->a_vals[i].bv_len;
                        *ptr++ = '\0';
                    }
-#ifdef SLAP_NVALUES_ON_DISK
+#ifdef SLAP_NVALUES
                    if (a->a_nvals != a->a_vals) {
                        entry_putlen(&ptr, i);
                        for (i=0; a->a_nvals[i].bv_val; i++) {
@@ -709,7 +709,7 @@ int entry_decode(struct berval *bv, Entry **e)
                bptr->bv_len = 0;
                bptr++;
 
-#ifdef SLAP_NVALUES_ON_DISK
+#ifdef SLAP_NVALUES
                j = entry_getlen(&ptr);
                if (j) {
                        a->a_nvals = bptr;
@@ -727,40 +727,7 @@ int entry_decode(struct berval *bv, Entry **e)
                } else {
                        a->a_nvals = a->a_vals;
                }
-#elif defined(SLAP_NVALUES)
-               if( count && ad->ad_type->sat_equality &&
-                       ad->ad_type->sat_equality->smr_normalize )
-               {
-                       a->a_nvals = ch_malloc((count+1)*sizeof(struct berval));
-
-                       for(j=0; j<count; j++) {
-                               rc = ad->ad_type->sat_equality->smr_normalize(
-                                       SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
-                                       ad->ad_type->sat_syntax,
-                                       ad->ad_type->sat_equality,
-                                       &a->a_vals[j], &a->a_nvals[j] );
-
-                               if( rc ) {
-#ifdef NEW_LOGGING
-                                       LDAP_LOG( OPERATION, DETAIL1,
-                                               "entry_decode: NULL (smr_normalize %d)\n",
-                                               rc, 0, 0 );
-#else
-                                       Debug( LDAP_DEBUG_ANY,
-                                               "<= entry_decode NULL (smr_normalize %d)\n",
-                                               rc, 0, 0 );
-#endif
-
-                                       return rc;
-                               }
-                       }
-                       a->a_nvals[j].bv_val = NULL;
-                       a->a_nvals[j].bv_len = 0;
-               } else {
-                       a->a_nvals = a->a_vals;
-               }
 #endif
-
        }
 
        if (a) a->a_next = NULL;
index 168cf296db3b755dffb540cadf95966b410634bb..585b9090a8d35759cd49061024970bec96ec6031 100644 (file)
@@ -37,7 +37,6 @@
 
 #ifdef LDAP_DEVEL
 #define SLAP_NVALUES 1
-#define SLAP_NVALUES_ON_DISK 1
 #define SLAP_EXTENDED_SCHEMA 1
 #define LDAP_CACHING
 #endif