From: Howard Chu Date: Tue, 23 Oct 2007 00:25:51 +0000 (+0000) Subject: ITS#5189 revert index.c 1.67, just catch LDAP_OTHER X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~488 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d7535d4ddc75a739aaa8d00c5007f55207ae723f;p=openldap ITS#5189 revert index.c 1.67, just catch LDAP_OTHER --- diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index c45e07a8b9..e193dae30d 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -20,7 +20,6 @@ #include #include -#include #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; } diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index f8cf1e138d..9437953137 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -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",