mirror of
https://github.com/samba-team/samba.git
synced 2025-11-11 00:23:51 +03:00
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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
0949db8119
commit
1da4ac2cdc
@@ -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;
|
||||
/* TODO implement a local transaction mechanism here */
|
||||
|
||||
if (lockname == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
/* TODO implement a local transaction mechanism here */
|
||||
|
||||
if (lockname == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* TODO implement a local unlocking 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
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user