#include <ac/string.h>
#include <ac/socket.h>
-#include <ac/errno.h>
#include "slap.h"
#include "back-bdb.h"
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
break;
- /* BDB also returns standard errno values */
- case ENOMEM:
- rc = LDAP_NO_MEMORY;
- break;
- /* Don't let any other BDB-specific errors thru */
+ /* Anything else is bad news */
default:
rc = LDAP_OTHER;
}
if( rc != 0 ) {
snprintf( text->bv_val, text->bv_len,
"index_entry_add failed: %s (%d)",
+ rc == LDAP_OTHER ? "Internal error" :
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
TXN_ABORT( tid );
snprintf( text->bv_val, text->bv_len,
"txn_aborted! %s (%d)",
+ rc == LDAP_OTHER ? "Internal error" :
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
"=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",