From f615fa44cf70e48f116d9356a0da79b0a61d9823 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 31 May 2008 18:44:40 +0000 Subject: [PATCH] pass ConfigReply to slapi overlay initialization --- servers/slapd/slapi/plugin.c | 15 +++++++++------ servers/slapd/slapi/proto-slapi.h | 2 +- servers/slapd/slapi/slapi_overlay.c | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/servers/slapd/slapi/plugin.c b/servers/slapd/slapi/plugin.c index d2b2aaebb4..d84921a242 100644 --- a/servers/slapd/slapi/plugin.c +++ b/servers/slapd/slapi/plugin.c @@ -21,10 +21,11 @@ */ #include "portable.h" -#include -#include -#include -#include +#include "ldap_pvt_thread.h" +#include "slap.h" +#include "config.h" +#include "slapi.h" +#include "lutil.h" /* * Note: if ltdl.h is not available, slapi should not be compiled @@ -645,8 +646,10 @@ slapi_int_read_config( /* automatically instantiate overlay if necessary */ if ( !slapi_over_is_inst( be ) ) { - if ( slapi_over_config( be ) != 0 ) { - fprintf( stderr, "Failed to instantiate SLAPI overlay\n"); + ConfigReply cr = { 0 }; + if ( slapi_over_config( be, &cr ) != 0 ) { + fprintf( stderr, "Failed to instantiate SLAPI overlay: " + "err=%d msg=\"%s\"\n", cr.err, cr.msg ); return -1; } } diff --git a/servers/slapd/slapi/proto-slapi.h b/servers/slapd/slapi/proto-slapi.h index 7359c6e28d..fc6941b220 100644 --- a/servers/slapd/slapi/proto-slapi.h +++ b/servers/slapd/slapi/proto-slapi.h @@ -83,7 +83,7 @@ LDAP_SLAPI_F (int) slapi_int_clear_object_extensions LDAP_P((int objecttype, voi /* slapi_overlay.c */ LDAP_SLAPI_F (int) slapi_over_is_inst LDAP_P((BackendDB *)); -LDAP_SLAPI_F (int) slapi_over_config LDAP_P((BackendDB *)); +LDAP_SLAPI_F (int) slapi_over_config LDAP_P((BackendDB *, ConfigReply *)); LDAP_END_DECL diff --git a/servers/slapd/slapi/slapi_overlay.c b/servers/slapd/slapi/slapi_overlay.c index 48cb7ae971..d717b4ceae 100644 --- a/servers/slapd/slapi/slapi_overlay.c +++ b/servers/slapd/slapi/slapi_overlay.c @@ -916,7 +916,7 @@ int slapi_over_is_inst( BackendDB *be ) return overlay_is_inst( be, SLAPI_OVERLAY_NAME ); } -int slapi_over_config( BackendDB *be ) +int slapi_over_config( BackendDB *be, ConfigReply *cr ) { if ( slapi_over_initialized == 0 ) { int rc; @@ -940,7 +940,7 @@ int slapi_over_config( BackendDB *be ) slapi_over_initialized = 1; } - return overlay_config( be, SLAPI_OVERLAY_NAME, -1, NULL ); + return overlay_config( be, SLAPI_OVERLAY_NAME, -1, NULL, cr ); } #endif /* LDAP_SLAPI */ -- 2.39.5