]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/error.c
Import ITS#4439 (slapd not responding) fix for BDB/HDB cache from HEAD
[openldap] / servers / slapd / back-bdb / error.c
index 79d528a0e0272b53aaab46b5902defd5a097718a..b36cca98f48d1547b174402acb5877b65b0b8cda 100644 (file)
@@ -1,8 +1,17 @@
 /* error.c - BDB errcall routine */
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 2000-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #include "portable.h"
 #include "slap.h"
 #include "back-bdb.h"
 
+#if DB_VERSION_FULL < 0x04030000
 void bdb_errcall( const char *pfx, char * msg )
+#else
+void bdb_errcall( const DB_ENV *env, const char *pfx, const char * msg )
+#endif
 {
 #ifdef HAVE_EBCDIC
        if ( msg[0] > 0x7f )
                __etoa( msg );
 #endif
-#ifdef NEW_LOGGING
-       LDAP_LOG ( OPERATION, INFO, "bdb(%s): %s\n", pfx, msg, 0 );
-#else
        Debug( LDAP_DEBUG_ANY, "bdb(%s): %s\n", pfx, msg, 0 );
+}
+
+#if DB_VERSION_FULL >= 0x04030000
+void bdb_msgcall( const DB_ENV *env, const char *msg )
+{
+#ifdef HAVE_EBCDIC
+       if ( msg[0] > 0x7f )
+               __etoa( msg );
 #endif
+       Debug( LDAP_DEBUG_TRACE, "bdb: %s\n", msg, 0, 0 );
 }
+#endif
 
 #ifdef HAVE_EBCDIC