X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Ferror.c;h=bb5eeb74d434ec4a4bc6ac07bdd974ef10d4dbd2;hb=966cef8c9a3238efe0c482ad0ee08fd98944d112;hp=783d23cc42e4d54f8215ac4eecdcea4b610f3dce;hpb=6939c531700652491f4be4688c6a1f35a1ab8a18;p=openldap
diff --git a/servers/slapd/back-bdb/error.c b/servers/slapd/back-bdb/error.c
index 783d23cc42..bb5eeb74d4 100644
--- a/servers/slapd/back-bdb/error.c
+++ b/servers/slapd/back-bdb/error.c
@@ -1,8 +1,17 @@
/* error.c - BDB errcall routine */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 2000-2011 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
+ * .
*/
#include "portable.h"
@@ -13,18 +22,29 @@
#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