]> git.sur5r.net Git - openldap/commitdiff
Fix rev 1.266, was creating {0}config entry prematurely.
authorHoward Chu <hyc@openldap.org>
Wed, 14 Nov 2007 01:28:29 +0000 (01:28 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 14 Nov 2007 01:28:29 +0000 (01:28 +0000)
servers/slapd/bconfig.c

index a0fa91525988b6a48573f802fe0097b4ee19c653..4564a6f5032387eaf2539ff80204e164b30d1d25 100644 (file)
@@ -5943,6 +5943,7 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
        Connection conn = {0};
        Operation *op = NULL;
        void *thrctx;
+       int isFrontend = 0;
 
        /* Create entry for frontend database if it does not exist already */
        if ( !entry_put_got_frontend ) {
@@ -5992,11 +5993,12 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
                                }
                        } else {
                                entry_put_got_frontend++;
+                               isFrontend = 1;
                        }
                }
        }
        /* Create entry for config database if it does not exist already */
-       if ( !entry_put_got_config ) {
+       if ( !entry_put_got_config && !isFrontend ) {
                if ( !strncmp( e->e_nname.bv_val, "olcDatabase",
                                STRLENOF( "olcDatabase" ))) {
                        if ( strncmp( e->e_nname.bv_val +