]> git.sur5r.net Git - openldap/commitdiff
Fix backend config table fallthru
authorHoward Chu <hyc@openldap.org>
Fri, 4 Mar 2005 10:01:31 +0000 (10:01 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 4 Mar 2005 10:01:31 +0000 (10:01 +0000)
servers/slapd/config.c

index da68df480892adc1bc8062f29c8972548e8c9ffc..48cba471a426626efe619d790d40089645d2b29f 100644 (file)
@@ -468,32 +468,29 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf)
                                }
                        }
                        
-               } else if ( c->be && c->be->be_cf_table ) {
-                       rc = parse_config_table( c->be->be_cf_table, c );
+               } else if ( c->be ) {
+                       if ( c->be->be_cf_table ) {
+                               rc = parse_config_table( c->be->be_cf_table, c );
 
-                       if ( rc ) {
-                               switch(rc) {
-                               case SLAP_CONF_UNKNOWN:
-                                       Debug( LDAP_DEBUG_CONFIG, "%s: "
-                                               "unknown directive <%s> inside backend database definition (ignored)\n",
-                                               c->log, *c->argv, 0);
-                                       continue;
-                               default:
-                                       goto badline;
-                               }
+                               if ( !rc ) continue;
+
+                               if ( rc != ARG_UNKNOWN ) goto badline;
                        }
 
-               } else if ( c->be && c->be->be_config ) {
-                       rc = (*c->be->be_config)(c->be, c->fname, c->lineno, c->argc, c->argv);
-                       if ( rc ) {
-                               switch(rc) {
-                               case SLAP_CONF_UNKNOWN:
-                                       Debug( LDAP_DEBUG_CONFIG, "%s: "
-                                               "unknown directive <%s> inside backend database definition (ignored)\n",
-                                               c->log, *c->argv, 0);
-                                       continue;
-                               default:
-                                       goto badline;
+                       if ( c->be->be_config ) {
+                               rc = (*c->be->be_config)(c->be, c->fname, c->lineno,
+                                       c->argc, c->argv);
+                               if ( rc ) {
+                                       switch(rc) {
+                                       case SLAP_CONF_UNKNOWN:
+                                               Debug( LDAP_DEBUG_CONFIG, "%s: "
+                                                       "unknown directive <%s> inside backend database "
+                                                       "definition (ignored)\n",
+                                                       c->log, *c->argv, 0);
+                                               continue;
+                                       default:
+                                               goto badline;
+                                       }
                                }
                        }