pass ConfigReply to slapi overlay initialization

This commit is contained in:
Pierangelo Masarati 2008-05-31 18:44:40 +00:00
parent 40f107bb58
commit f615fa44cf
3 changed files with 12 additions and 9 deletions

View File

@ -21,10 +21,11 @@
*/ */
#include "portable.h" #include "portable.h"
#include <ldap_pvt_thread.h> #include "ldap_pvt_thread.h"
#include <slap.h> #include "slap.h"
#include <slapi.h> #include "config.h"
#include <lutil.h> #include "slapi.h"
#include "lutil.h"
/* /*
* Note: if ltdl.h is not available, slapi should not be compiled * 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 */ /* automatically instantiate overlay if necessary */
if ( !slapi_over_is_inst( be ) ) { if ( !slapi_over_is_inst( be ) ) {
if ( slapi_over_config( be ) != 0 ) { ConfigReply cr = { 0 };
fprintf( stderr, "Failed to instantiate SLAPI overlay\n"); 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; return -1;
} }
} }

View File

@ -83,7 +83,7 @@ LDAP_SLAPI_F (int) slapi_int_clear_object_extensions LDAP_P((int objecttype, voi
/* slapi_overlay.c */ /* slapi_overlay.c */
LDAP_SLAPI_F (int) slapi_over_is_inst LDAP_P((BackendDB *)); 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 LDAP_END_DECL

View File

@ -916,7 +916,7 @@ int slapi_over_is_inst( BackendDB *be )
return overlay_is_inst( be, SLAPI_OVERLAY_NAME ); 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 ) { if ( slapi_over_initialized == 0 ) {
int rc; int rc;
@ -940,7 +940,7 @@ int slapi_over_config( BackendDB *be )
slapi_over_initialized = 1; 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 */ #endif /* LDAP_SLAPI */