From 63035a5b5bb633b44f71d12c30d53f0a9e16c94d Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 13 Apr 2004 18:49:31 +0000 Subject: [PATCH] allow optional overlays --- servers/slapd/config.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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 */ -- 2.39.5