summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-09-24 15:42:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:52 -0500
commit63b43dd12fb579aaaccedd07aaa630cb1cd7aa88 (patch)
treed54cc9e41c4410c2a2e42f7479ff52a1fa0c156b /source4/lib/ldb/modules
parent70b52b02a77c695d32aa57daaeb5689cd6857eba (diff)
downloadsamba-63b43dd12fb579aaaccedd07aaa630cb1cd7aa88.tar.gz
samba-63b43dd12fb579aaaccedd07aaa630cb1cd7aa88.tar.bz2
samba-63b43dd12fb579aaaccedd07aaa630cb1cd7aa88.zip
r10477: expose transactions outside ldb and change the API once more
do not autostart transactions on ldb operations if a transaction is already in place test transactions on winsdb all my tests passes so far tridge please confirm this is ok for you (This used to be commit c2bb2a36bdbe0ec7519697a9a9ba7526a0defac2)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r--source4/lib/ldb/modules/ldb_map.c12
-rw-r--r--source4/lib/ldb/modules/rdn_name.c13
-rw-r--r--source4/lib/ldb/modules/schema.c11
-rw-r--r--source4/lib/ldb/modules/skel.c11
-rw-r--r--source4/lib/ldb/modules/timestamps.c13
5 files changed, 46 insertions, 14 deletions
diff --git a/source4/lib/ldb/modules/ldb_map.c b/source4/lib/ldb/modules/ldb_map.c
index 69e021b4ee..1133991ac4 100644
--- a/source4/lib/ldb/modules/ldb_map.c
+++ b/source4/lib/ldb/modules/ldb_map.c
@@ -1258,9 +1258,14 @@ static int map_start_trans(struct ldb_module *module)
return ldb_next_start_trans(module);
}
-static int map_end_trans(struct ldb_module *module, int status)
+static int map_end_trans(struct ldb_module *module)
{
- return ldb_next_end_trans(module, status);
+ return ldb_next_end_trans(module);
+}
+
+static int map_del_trans(struct ldb_module *module)
+{
+ return ldb_next_del_trans(module);
}
static const struct ldb_module_ops map_ops = {
@@ -1272,7 +1277,8 @@ static const struct ldb_module_ops map_ops = {
.delete_record = map_delete,
.rename_record = map_rename,
.start_transaction = map_start_trans,
- .end_transaction = map_end_trans
+ .end_transaction = map_end_trans,
+ .del_transaction = map_del_trans
};
static char *map_find_url(struct ldb_context *ldb, const char *name)
diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c
index c1a0c0852a..3e3fbd544f 100644
--- a/source4/lib/ldb/modules/rdn_name.c
+++ b/source4/lib/ldb/modules/rdn_name.c
@@ -220,10 +220,16 @@ static int rdn_start_trans(struct ldb_module *module)
return ldb_next_start_trans(module);
}
-static int rdn_end_trans(struct ldb_module *module, int status)
+static int rdn_end_trans(struct ldb_module *module)
{
ldb_debug(module->ldb, LDB_DEBUG_TRACE, "rdn_end_trans\n");
- return ldb_next_end_trans(module, status);
+ return ldb_next_end_trans(module);
+}
+
+static int rdn_del_trans(struct ldb_module *module)
+{
+ ldb_debug(module->ldb, LDB_DEBUG_TRACE, "rdn_del_trans\n");
+ return ldb_next_del_trans(module);
}
static int rdn_name_destructor(void *module_ctx)
@@ -242,7 +248,8 @@ static const struct ldb_module_ops rdn_name_ops = {
.delete_record = rdn_name_delete_record,
.rename_record = rdn_name_rename_record,
.start_transaction = rdn_start_trans,
- .end_transaction = rdn_end_trans
+ .end_transaction = rdn_end_trans,
+ .del_transaction = rdn_del_trans
};
diff --git a/source4/lib/ldb/modules/schema.c b/source4/lib/ldb/modules/schema.c
index 1a2c2b8f97..e882f72bd4 100644
--- a/source4/lib/ldb/modules/schema.c
+++ b/source4/lib/ldb/modules/schema.c
@@ -520,8 +520,12 @@ static int schema_start_trans(struct ldb_module *module) {
return ldb_next_start_trans(module);
}
-static int schema_end_trans(struct ldb_module *module, int status) {
- return ldb_next_end_trans(module, status);
+static int schema_end_trans(struct ldb_module *module) {
+ return ldb_next_end_trans(module);
+}
+
+static int schema_del_trans(struct ldb_module *module) {
+ return ldb_next_del_trans(module);
}
static int schema_destructor(void *module_ctx)
@@ -540,7 +544,8 @@ static const struct ldb_module_ops schema_ops = {
.delete_record = schema_delete_record,
.rename_record = schema_rename_record,
.start_transaction = schema_start_trans,
- .end_transaction = schema_end_trans
+ .end_transaction = schema_end_trans,
+ .del_transaction = schema_del_trans
};
#ifdef HAVE_DLOPEN_DISABLED
diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c
index 701128cd27..5d14a27a7b 100644
--- a/source4/lib/ldb/modules/skel.c
+++ b/source4/lib/ldb/modules/skel.c
@@ -80,9 +80,15 @@ static int skel_start_trans(struct ldb_module *module)
}
/* end a transaction */
-static int skel_end_trans(struct ldb_module *module, int status)
+static int skel_end_trans(struct ldb_module *module)
{
- return ldb_next_end_trans(module, status);
+ return ldb_next_end_trans(module);
+}
+
+/* delete a transaction */
+static int skel_del_trans(struct ldb_module *module)
+{
+ return ldb_next_del_trans(module);
}
static int skel_destructor(void *module_ctx)
@@ -104,6 +110,7 @@ static const struct ldb_module_ops skel_ops = {
.rename_record = skel_rename_record,
.start_transaction = skel_start_trans,
.end_transaction = skel_end_trans,
+ .del_transaction = skel_del_trans,
};
#ifdef HAVE_DLOPEN_DISABLED
diff --git a/source4/lib/ldb/modules/timestamps.c b/source4/lib/ldb/modules/timestamps.c
index dc91937f85..01e5c2c37c 100644
--- a/source4/lib/ldb/modules/timestamps.c
+++ b/source4/lib/ldb/modules/timestamps.c
@@ -217,10 +217,16 @@ static int timestamps_start_trans(struct ldb_module *module)
return ldb_next_start_trans(module);
}
-static int timestamps_end_trans(struct ldb_module *module, int status)
+static int timestamps_end_trans(struct ldb_module *module)
{
ldb_debug(module->ldb, LDB_DEBUG_TRACE, "timestamps_end_trans\n");
- return ldb_next_end_trans(module, status);
+ return ldb_next_end_trans(module);
+}
+
+static int timestamps_del_trans(struct ldb_module *module)
+{
+ ldb_debug(module->ldb, LDB_DEBUG_TRACE, "timestamps_del_trans\n");
+ return ldb_next_del_trans(module);
}
static int timestamps_destructor(void *module_ctx)
@@ -239,7 +245,8 @@ static const struct ldb_module_ops timestamps_ops = {
.delete_record = timestamps_delete_record,
.rename_record = timestamps_rename_record,
.start_transaction = timestamps_start_trans,
- .end_transaction = timestamps_end_trans
+ .end_transaction = timestamps_end_trans,
+ .del_transaction = timestamps_del_trans
};