ITS#5189 revert index.c 1.67, just catch LDAP_OTHER

This commit is contained in:
Howard Chu 2007-10-23 00:25:51 +00:00
parent bb1d8dfcd7
commit d7535d4ddc
2 changed files with 3 additions and 6 deletions

View file

@ -20,7 +20,6 @@
#include <ac/string.h>
#include <ac/socket.h>
#include <ac/errno.h>
#include "slap.h"
#include "back-bdb.h"
@ -289,11 +288,7 @@ done:
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;
}

View file

@ -532,6 +532,7 @@ ID bdb_tool_entry_put(
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",
@ -571,6 +572,7 @@ done:
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",