From 80e5c43346cb168d97b0ef4a6b518b0645f9206f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 13 Apr 1999 06:21:30 +0000 Subject: [PATCH] Add dummy bdb2_back_entry_release_rw() to be completed later --- servers/slapd/back-bdb2/Makefile.in | 4 ++-- servers/slapd/back-bdb2/add.c | 6 ++++-- servers/slapd/back-bdb2/entry.c | 23 +++++++++++++++++++++++ servers/slapd/back-bdb2/init.c | 1 + servers/slapd/back-bdb2/proto-back-bdb2.h | 5 +++++ 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 servers/slapd/back-bdb2/entry.c diff --git a/servers/slapd/back-bdb2/Makefile.in b/servers/slapd/back-bdb2/Makefile.in index b2ca6b4ad8..a0d5e205cf 100644 --- a/servers/slapd/back-bdb2/Makefile.in +++ b/servers/slapd/back-bdb2/Makefile.in @@ -1,10 +1,10 @@ XSRCS = version.c -SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \ +SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \ index.c id2children.c nextid.c abandon.c compare.c group.c \ modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ filterindex.c unbind.c kerberos.c close.c alias.c startup.c \ timing.c porter.c txn.c -OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ +OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o entry.c id2entry.o \ index.o id2children.o nextid.o abandon.o compare.o group.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ filterindex.o unbind.o kerberos.o close.o alias.o startup.o \ diff --git a/servers/slapd/back-bdb2/add.c b/servers/slapd/back-bdb2/add.c index 6edf1f636d..45e65be232 100644 --- a/servers/slapd/back-bdb2/add.c +++ b/servers/slapd/back-bdb2/add.c @@ -217,8 +217,10 @@ return_results:; bdb2i_cache_return_entry_w( &li->li_cache, p ); } - /* free entry and writer lock */ - bdb2i_cache_return_entry_w( &li->li_cache, e ); + if ( rc ) { + /* free entry and writer lock */ + bdb2i_cache_return_entry_w( &li->li_cache, e ); + } return( rc ); } diff --git a/servers/slapd/back-bdb2/entry.c b/servers/slapd/back-bdb2/entry.c new file mode 100644 index 0000000000..c67f7a6418 --- /dev/null +++ b/servers/slapd/back-bdb2/entry.c @@ -0,0 +1,23 @@ +/* entry.c - ldbm backend entry_release routine */ + +#include "portable.h" + +#include + +#include +#include + +#include "slap.h" +#include "back-ldbm.h" +#include "proto-back-ldbm.h" + + +int +ldbm_back_entry_release_rw( + BackendDB *be, + Entry *e, + int rw +) +{ + return 0; +} diff --git a/servers/slapd/back-bdb2/init.c b/servers/slapd/back-bdb2/init.c index d1725f5f59..a36b11cab2 100644 --- a/servers/slapd/back-bdb2/init.c +++ b/servers/slapd/back-bdb2/init.c @@ -61,6 +61,7 @@ bdb2_back_initialize( bi->bi_op_delete = bdb2_back_delete; bi->bi_op_abandon = bdb2_back_abandon; + bi->bi_entry_release_rw = bdb2_back_entry_release_rw; #ifdef SLAPD_ACLGROUPS bi->bi_acl_group = bdb2_back_group; #endif diff --git a/servers/slapd/back-bdb2/proto-back-bdb2.h b/servers/slapd/back-bdb2/proto-back-bdb2.h index 78e853c7d3..04b787fe8c 100644 --- a/servers/slapd/back-bdb2/proto-back-bdb2.h +++ b/servers/slapd/back-bdb2/proto-back-bdb2.h @@ -74,6 +74,11 @@ Entry * bdb2i_dn2entry_rw LDAP_P(( BackendDB *be, char *dn, char **matched, #define bdb2i_dn2entry_r(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 0) #define bdb2i_dn2entry_w(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 1) +/* + * entry.c + */ +int bdb2_back_entry_release_rw LDAP_P(( BackendDB *be, Entry *e, int rw )); + /* * filterindex.c */ -- 2.39.5