summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-05-29 23:46:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:43 -0500
commit0c7b82e5f6063de4114de21cf854ac67346e31f6 (patch)
treecc66c4f23e7029eae3be6edaf09d194d71016d47 /source4/lib/ldb/common/ldb.c
parent787d67c2cd780656cb5e6c0884c485f287b72c49 (diff)
downloadsamba-0c7b82e5f6063de4114de21cf854ac67346e31f6.tar.gz
samba-0c7b82e5f6063de4114de21cf854ac67346e31f6.tar.bz2
samba-0c7b82e5f6063de4114de21cf854ac67346e31f6.zip
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)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c26
1 files changed, 2 insertions, 24 deletions
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;