]> git.sur5r.net Git - openldap/commitdiff
ITS#5189 revert index.c 1.67, just catch LDAP_OTHER
authorHoward Chu <hyc@openldap.org>
Tue, 23 Oct 2007 00:25:51 +0000 (00:25 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 23 Oct 2007 00:25:51 +0000 (00:25 +0000)
servers/slapd/back-bdb/index.c
servers/slapd/back-bdb/tools.c

index c45e07a8b95c16ca9c3ab6ca0303304bd1ee1d92..e193dae30d90e5ab122931421e12b28f2dbe0ac5 100644 (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;
        }
index f8cf1e138dec0cd0b50300b97d7938e5061e3b61..9437953137dfc239495bd7a45dd9fd9ec7fa6408 100644 (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",