From f4cfb13f2ccb5d3224d8eff5955c18092a9e0197 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 14 Jan 2002 20:26:51 +0000 Subject: [PATCH] Fix previous commit --- servers/slapd/back-bdb/index.c | 12 +++++++++--- servers/slapd/back-ldbm/index.c | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index eff91a3255..c42beef611 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -57,11 +57,17 @@ static slap_mask_t index_mask( bdb_attr_mask( be->be_private, at->sat_ad, &mask ); - if ( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + if ( mask & SLAP_INDEX_AUTO_SUBTYPES ) { *atname = desc->ad_type->sat_cname; *dbname = at->sat_cname.bv_val; return mask; } + + if ( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + *atname = at->sat_cname; + *dbname = at->sat_cname.bv_val; + return mask; + } } return 0; @@ -291,8 +297,9 @@ static int index_at_values( if( mask ) { *dbnamep = type->sat_cname.bv_val; - } else if ( tmpmask ^ SLAP_INDEX_NOSUBTYPES ) { + } else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) { mask = tmpmask; + *maskp = mask; } if( mask ) { @@ -302,7 +309,6 @@ static int index_at_values( mask ); if( rc ) return rc; - *maskp = mask; } if( lang->bv_len ) { diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 65347d8e77..8bfc8da2f3 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -54,11 +54,17 @@ static slap_mask_t index_mask( attr_mask( be->be_private, at->sat_ad, &mask ); - if( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + if( mask & SLAP_INDEX_AUTO_SUBTYPES ) { *atname = desc->ad_type->sat_cname; *dbname = at->sat_cname.bv_val; return mask; } + + if( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + *atname = at->sat_cname; + *dbname = at->sat_cname.bv_val; + return mask; + } } return 0; @@ -257,8 +263,9 @@ static int index_at_values( if( mask ) { *dbnamep = type->sat_cname.bv_val; - } else if ( tmpmask ^ SLAP_INDEX_NOSUBTYPES ) { + } else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) { mask = tmpmask; + *maskp = mask; } if( mask ) { @@ -266,7 +273,6 @@ static int index_at_values( &type->sat_cname, vals, id, op, mask ); - *maskp = mask; } if( lang->bv_len ) { -- 2.39.5