From 0c7b82e5f6063de4114de21cf854ac67346e31f6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 29 May 2006 23:46:43 +0000 Subject: r15942: Remove the sync internal ldb calls altogether. This means that some modules have been disabled as well as they have not been ported to the async interface One of them is the ugly objectclass module. I hope that the change in samldb module will make the MMC happy without the need of this crappy module, we need proper handling in a decent schema module. proxy and ldb_map have also been disabled ldb_sqlite3 need to be ported as well (currenlty just broken). (This used to be commit 51083de795bdcbf649de926e86969adc20239b6d) --- source4/lib/ldb/common/ldb.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'source4/lib/ldb/common/ldb.c') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 28b9728d0a..5fbaf54920 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -273,35 +273,16 @@ static int ldb_op_finish(struct ldb_context *ldb, int status) /* start an ldb request - autostarts a transacion if none active and the operation is not a search - does not work for ASYNC operations NOTE: the request must be a talloc context. returns LDB_ERR_* on errors. */ int ldb_request(struct ldb_context *ldb, struct ldb_request *req) { struct ldb_module *module; - int ret, started_transaction=0; + int ret; ldb_reset_err_string(ldb); - if (req->operation == LDB_REQ_SEARCH) { - req->op.search.res = NULL; - } - - /* start a transaction if SYNC and not search */ - if ((!ldb->transaction_active) && - (req->operation == LDB_REQ_ADD || - req->operation == LDB_REQ_MODIFY || - req->operation == LDB_REQ_DELETE || - req->operation == LDB_REQ_RENAME)) { - ret = ldb_transaction_start(ldb); - if (ret != LDB_SUCCESS) { - return ret; - } - started_transaction = 1; - } - /* call the first module in the chain */ switch (req->operation) { case LDB_ASYNC_SEARCH: @@ -330,10 +311,6 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *req) break; } - if (started_transaction) { - return ldb_op_finish(ldb, ret); - } - return ret; } @@ -463,6 +440,7 @@ int ldb_search(struct ldb_context *ldb, return ret; } +/* autostarts a transacion if none active */ static int ldb_autotransaction_request(struct ldb_context *ldb, struct ldb_request *req) { int ret, close_transaction; -- cgit