andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 748ca45d9ee4cad44575ce3acd3d0bb2eb7898e2 Mon Sep 17 00:00:00 2001
dc8c34
From: Noriko Hosoi <nhosoi@redhat.com>
dc8c34
Date: Mon, 22 Sep 2014 14:19:35 -0700
dc8c34
Subject: [PATCH 262/262] Ticket 47750 - Entry cache part 2
dc8c34
dc8c34
Description: One line fix in the previous patch.
dc8c34
entrycache_add_int is supposed to return 1 instead of -1 for the
dc8c34
"entry already exists in cache" case.
dc8c34
dc8c34
(cherry picked from commit 189eb8a0b6cf876e6bc39d0cb8cb4c08b29c9ce1)
dc8c34
---
dc8c34
 ldap/servers/slapd/back-ldbm/cache.c | 2 +-
dc8c34
 1 file changed, 1 insertion(+), 1 deletion(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c
dc8c34
index 202386e..13064d0 100644
dc8c34
--- a/ldap/servers/slapd/back-ldbm/cache.c
dc8c34
+++ b/ldap/servers/slapd/back-ldbm/cache.c
dc8c34
@@ -1352,7 +1352,7 @@ entrycache_add_int(struct cache *cache, struct backentry *e, int state,
dc8c34
                     LOG("the entry %s already exists.  returning existing entry %s (state: 0x%x)\n",
dc8c34
                         ndn, backentry_get_ndn(my_alt), state);
dc8c34
                     cache_unlock(cache);
dc8c34
-                    return -1;
dc8c34
+                    return 1;
dc8c34
                 } else {
dc8c34
                     LOG("the entry %s already exists.  Not returning existing entry %s (state: 0x%x)\n",
dc8c34
                         ndn, backentry_get_ndn(my_alt), state);
dc8c34
-- 
dc8c34
1.9.3
dc8c34