op->o_callback = ≻
op->orr_newrdn = *newrdn;
op->orr_nnewrdn = *nnewrdn;
+ op->orr_newSup = NULL;
+ op->orr_nnewSup = NULL;
op->orr_deleteoldrdn = 1;
op->orr_modlist = NULL;
slap_modrdn2mods( op, rs );
if ( ce->ce_type == ce_type ) nsibs++;
}
+ /* account for -1 frontend */
+ if ( ce_type == Cft_Database )
+ nsibs--;
+
if ( index != nsibs ) {
if ( gotindex ) {
if ( index < nsibs ) {
renumber = 1;
}
}
- if ( !isfrontend && index == -1 )
+ if ( !isfrontend && index == -1 ) {
index = nsibs;
+ }
/* just make index = nsibs */
if ( !renumber ) {
ca->valx = d->idx[i];
rc = config_del_vals( ct, ca );
if ( rc != LDAP_SUCCESS ) break;
- s->a_flags |= SLAP_ATTR_IXDEL;
+ if ( s )
+ s->a_flags |= SLAP_ATTR_IXDEL;
for (j=i+1; j < d->nidx; j++)
if ( d->idx[j] >d->idx[i] )
d->idx[j]--;
ca->line = NULL;
rc = config_del_vals( ct, ca );
if ( rc ) rc = LDAP_OTHER;
- s->a_flags |= SLAP_ATTR_IXDEL;
+ if ( s )
+ s->a_flags |= SLAP_ATTR_IXDEL;
}
if ( ml->sml_values ) {
d = d->next;
ce->ce_parent = parent;
if ( parent ) {
pdn = parent->ce_entry->e_nname;
- if ( parent->ce_kids && parent->ce_kids->ce_type < ce->ce_type )
+ if ( parent->ce_kids )
for ( ceprev = parent->ce_kids; ceprev->ce_sibs &&
- ceprev->ce_type < ce->ce_type;
+ ceprev->ce_type <= ce->ce_type;
ceprev = ceprev->ce_sibs );
} else {
BER_BVZERO( &pdn );