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