summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-09-17 19:25:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:14 -0500
commit8919d6bf9a88ce9ac43dae61989c33082c984b66 (patch)
tree55302a32ab9da077db48a69313fe648abdf578c9 /source4/lib/ldb/ldb_ldap
parentf1d065128d8715e9ee34a31bbdc60d9d4e00a6a8 (diff)
downloadsamba-8919d6bf9a88ce9ac43dae61989c33082c984b66.tar.gz
samba-8919d6bf9a88ce9ac43dae61989c33082c984b66.tar.bz2
samba-8919d6bf9a88ce9ac43dae61989c33082c984b66.zip
r10299: remove the public (un)lock functions and introduce a transaction based
private ldb API ldb_sqlite3 is already working with this model and ldb_tdb will do as soon as tridge finishes the tdb transaction code. currently the transactions are always implicit and wrap any single ldb API call except searching, the transaction functions are currently not made public on purpose. Simo. (This used to be commit 1da4ac2cdcb7e54076f85242a93784260dced918)
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 2da4f1af8e..39f56dba0e 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -450,30 +450,18 @@ static int lldb_modify(struct ldb_module *module, const struct ldb_message *msg)
return ret;
}
-static int lldb_lock(struct ldb_module *module, const char *lockname)
+static int lldb_start_trans(struct ldb_module *module)
{
- int ret = 0;
-
- if (lockname == NULL) {
- return -1;
- }
+ /* TODO implement a local transaction mechanism here */
- /* TODO implement a local locking mechanism here */
-
- return ret;
+ return 0;
}
-static int lldb_unlock(struct ldb_module *module, const char *lockname)
+static int lldb_end_trans(struct ldb_module *module, int status)
{
- int ret = 0;
-
- if (lockname == NULL) {
- return -1;
- }
-
- /* TODO implement a local unlocking mechanism here */
+ /* TODO implement a local transaction mechanism here */
- return ret;
+ return status;
}
/*
@@ -487,16 +475,16 @@ static const char *lldb_errstring(struct ldb_module *module)
static const struct ldb_module_ops lldb_ops = {
- .name = "ldap",
- .search = lldb_search,
- .search_bytree = lldb_search_bytree,
- .add_record = lldb_add,
- .modify_record = lldb_modify,
- .delete_record = lldb_delete,
- .rename_record = lldb_rename,
- .named_lock = lldb_lock,
- .named_unlock = lldb_unlock,
- .errstring = lldb_errstring
+ .name = "ldap",
+ .search = lldb_search,
+ .search_bytree = lldb_search_bytree,
+ .add_record = lldb_add,
+ .modify_record = lldb_modify,
+ .delete_record = lldb_delete,
+ .rename_record = lldb_rename,
+ .start_transaction = lldb_start_trans,
+ .end_transaction = lldb_end_trans,
+ .errstring = lldb_errstring
};