mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-18 15:20:35 +08:00
#unifdef -DSLAP_NVALUES_ON_DISK
This commit is contained in:
parent
f8682550d7
commit
2d68ec09f2
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user