]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/plugin.c
fix ITS#5959 fix
[openldap] / servers / slapd / slapi / plugin.c
index ecaf0fa697b30663d01a3145a3807f53c6eb0e23..89649726c789d555ea5bca934d3c08198613e319 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2002-2007 The OpenLDAP Foundation.
+ * Copyright 2002-2009 The OpenLDAP Foundation.
  * Portions Copyright 1997,2002-2003 IBM Corporation.
  * All rights reserved.
  *
  */
 
 #include "portable.h"
-#include <ldap_pvt_thread.h>
-#include <slap.h>
-#include <slapi.h>
-#include <lutil.h>
+#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
@@ -598,7 +599,7 @@ slapi_int_call_plugins(
        rc = slapi_int_get_plugins( be, funcType, &tmpPlugin );
        if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) {
                /* Nothing to do, front-end should ignore. */
-               return 1;
+               return rc;
        }
 
        for ( pGetPlugin = tmpPlugin ; *pGetPlugin != NULL; pGetPlugin++ ) {
@@ -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;
                }
        }