1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-02 00:23:50 +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:
Simo Sorce
2005-09-17 19:25:50 +00:00
committed by Gerald (Jerry) Carter
parent 0949db8119
commit 1da4ac2cdc
13 changed files with 232 additions and 275 deletions

View File

@@ -73,16 +73,16 @@ static int skel_rename_record(struct ldb_module *module, const struct ldb_dn *ol
return ldb_next_rename_record(module, olddn, newdn);
}
/* named_lock */
static int skel_named_lock(struct ldb_module *module, const char *lockname)
/* start a transaction */
static int skel_start_trans(struct ldb_module *module)
{
return ldb_next_named_lock(module, lockname);
return ldb_next_start_trans(module);
}
/* named_unlock */
static int skel_named_unlock(struct ldb_module *module, const char *lockname)
/* end a transaction */
static int skel_end_trans(struct ldb_module *module, int status)
{
return ldb_next_named_unlock(module, lockname);
return ldb_next_end_trans(module, status);
}
/* return extended error information */
@@ -101,16 +101,16 @@ static int skel_destructor(void *module_ctx)
}
static const struct ldb_module_ops skel_ops = {
.name = "skel",
.search = skel_search,
.search_bytree = skel_search_bytree,
.add_record = skel_add_record,
.modify_record = skel_modify_record,
.delete_record = skel_delete_record,
.rename_record = skel_rename_record,
.named_lock = skel_named_lock,
.named_unlock = skel_named_unlock,
.errstring = skel_errstring
.name = "skel",
.search = skel_search,
.search_bytree = skel_search_bytree,
.add_record = skel_add_record,
.modify_record = skel_modify_record,
.delete_record = skel_delete_record,
.rename_record = skel_rename_record,
.start_transaction = skel_start_trans,
.end_transaction = skel_end_trans,
.errstring = skel_errstring
};
#ifdef HAVE_DLOPEN_DISABLED