]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/config.c
return structuralObjectClass errors
[openldap] / servers / slapd / back-bdb / config.c
index d5ffaa991d66126d17dae588fca9f999481e9c15..34530f38f2f08043856ecfb80ea8001b2ca5761e 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -189,6 +189,7 @@ bdb_online_index( void *ctx, void *arg )
        ID id, nid;
        EntryInfo *ei;
        int rc, getnext = 1;
+       int i;
 
        connection_fake_init( &conn, op, ctx );
 
@@ -270,6 +271,16 @@ bdb_online_index( void *ctx, void *arg )
                getnext = 1;
        }
 
+       for ( i = 0; i < bdb->bi_nattrs; i++ ) {
+               if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING
+                       || bdb->bi_attrs[ i ]->ai_newmask == 0 )
+               {
+                       continue;
+               }
+               bdb->bi_attrs[ i ]->ai_indexmask = bdb->bi_attrs[ i ]->ai_newmask;
+               bdb->bi_attrs[ i ]->ai_newmask = 0;
+       }
+
        ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
        ldap_pvt_runqueue_stoptask( &slapd_rq, rtask );
        bdb->bi_index_task = NULL;
@@ -479,7 +490,7 @@ bdb_cf_gen(ConfigArgs *c)
                                struct berval bv, def = BER_BVC("default");
                                char *ptr;
 
-                               for (ptr = c->line; !isspace( *ptr ); ptr++);
+                               for (ptr = c->line; !isspace( (unsigned char) *ptr ); ptr++);
 
                                bv.bv_val = c->line;
                                bv.bv_len = ptr - bv.bv_val;
@@ -567,8 +578,8 @@ bdb_cf_gen(ConfigArgs *c)
 
                if ( c->op == SLAP_CONFIG_ADD ) {
                        ptr += STRLENOF("dbconfig");
-                       while (!isspace(*ptr)) ptr++;
-                       while (isspace(*ptr)) ptr++;
+                       while (!isspace((unsigned char)*ptr)) ptr++;
+                       while (isspace((unsigned char)*ptr)) ptr++;
                }
 
                if ( bdb->bi_flags & BDB_IS_OPEN ) {