From: Pierangelo Masarati Date: Tue, 13 Apr 2004 18:49:31 +0000 (+0000) Subject: allow optional overlays X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=63035a5b5bb633b44f71d12c30d53f0a9e16c94d;p=openldap allow optional overlays --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 2edeab448a..5efcd11536 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -979,8 +979,21 @@ read_config( const char *fname, int depth ) #endif return 1; - } else if ( overlay_config( be, cargv[1] )) { - return 1; + } else { + if ( cargv[1][0] == '-' && overlay_config( be, &cargv[1][1] ) ) { + /* log error */ +#ifdef NEW_LOGGING + LDAP_LOG( CONFIG, INFO, "%s: line %d: " + "(optional) overlay \"%s\" configuration " + "failed (ignored)\n", fname, lineno, &cargv[1][1] ); +#else + Debug( LDAP_DEBUG_ANY, "%s: line %d: " + "(optional) overlay \"%s\" configuration " + "failed (ignored)\n", fname, lineno, &cargv[1][1] ); +#endif + } else if ( overlay_config( be, cargv[1] ) ) { + return 1; + } } /* set database suffix */