]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/error.c
Optimize modify_internal, only reindex the actual modified values, not
[openldap] / servers / slapd / back-bdb / error.c
index 9e126da605baa133621bdd1b05daa70c50476840..783d23cc42e4d54f8215ac4eecdcea4b610f3dce 100644 (file)
@@ -1,7 +1,7 @@
-/* error.c - BDB errcall routine  */
+/* error.c - BDB errcall routine */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
 
 void bdb_errcall( const char *pfx, char * msg )
 {
-       Debug( LDAP_DEBUG_ANY, "bdb(%s): %s", pfx, msg, 0 );
+#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 );
+#endif
 }
+
+#ifdef HAVE_EBCDIC
+
+#undef db_strerror
+
+/* Not re-entrant! */
+char *ebcdic_dberror( int rc )
+{
+       static char msg[1024];
+
+       strcpy( msg, db_strerror( rc ) );
+       __etoa( msg );
+       return msg;
+}
+#endif