]> git.sur5r.net Git - openldap/commitdiff
ITS#4833 fix olcDatabase index offset
authorHoward Chu <hyc@openldap.org>
Wed, 7 Feb 2007 16:00:03 +0000 (16:00 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 7 Feb 2007 16:00:03 +0000 (16:00 +0000)
servers/slapd/bconfig.c

index acd4dd853b0871cc1d8db54dc52edcdaa9c660c9..00f581e1644a4e36c1ffa0cf6d1b498af4dff445 100644 (file)
@@ -4003,8 +4003,11 @@ check_name_index( CfEntryInfo *parent, ConfigType ce_type, Entry *e,
                                        renumber = 1;
                        }
                }
-               if ( !isfrontend && index == -1 )
+               if ( !isfrontend && index == -1 ) {
                        index = nsibs;
+                       if ( ce_type == Cft_Database )
+                               index--;
+               }
 
                /* just make index = nsibs */
                if ( !renumber ) {