summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-07-22 17:21:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:10:17 -0500
commit49f68caed20d2a7d1850e493005bdf85929d6365 (patch)
tree6c81b47125cbe4a597c379d8876d919832cde4db /source4/lib/ldb/common/ldb.c
parentc93817b36d3ff7f44cb7b3e1d1a29e37ec12affe (diff)
downloadsamba-49f68caed20d2a7d1850e493005bdf85929d6365.tar.gz
samba-49f68caed20d2a7d1850e493005bdf85929d6365.tar.bz2
samba-49f68caed20d2a7d1850e493005bdf85929d6365.zip
r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index a962aa4322..9420318fa9 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -335,7 +335,7 @@ static int ldb_autotransaction_request(struct ldb_context *ldb, struct ldb_reque
ret = ldb_request(ldb, req);
if (ret == LDB_SUCCESS) {
- ret = ldb_wait(req->async.handle, LDB_WAIT_ALL);
+ ret = ldb_wait(req->handle, LDB_WAIT_ALL);
}
if (ret == LDB_SUCCESS) {
@@ -369,11 +369,11 @@ int ldb_set_timeout(struct ldb_context *ldb, struct ldb_request *req, int timeou
if (req == NULL) return LDB_ERR_OPERATIONS_ERROR;
if (timeout != 0) {
- req->async.timeout = timeout;
+ req->timeout = timeout;
} else {
- req->async.timeout = ldb->default_timeout;
+ req->timeout = ldb->default_timeout;
}
- req->async.starttime = time(NULL);
+ req->starttime = time(NULL);
return LDB_SUCCESS;
}
@@ -390,11 +390,11 @@ int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *o
if (oldreq == NULL)
return ldb_set_timeout(ldb, newreq, 0);
- if ((now - oldreq->async.starttime) > oldreq->async.timeout) {
+ if ((now - oldreq->starttime) > oldreq->timeout) {
return LDB_ERR_TIME_LIMIT_EXCEEDED;
}
- newreq->async.starttime = oldreq->async.starttime;
- newreq->async.timeout = oldreq->async.timeout - (now - oldreq->async.starttime);
+ newreq->starttime = oldreq->starttime;
+ newreq->timeout = oldreq->timeout - (now - oldreq->starttime);
return LDB_SUCCESS;
}
@@ -556,14 +556,14 @@ int ldb_search(struct ldb_context *ldb,
req->op.search.attrs = attrs;
req->controls = NULL;
- req->async.context = res;
- req->async.callback = ldb_search_callback;
+ req->context = res;
+ req->callback = ldb_search_callback;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
ret = ldb_request(ldb, req);
if (ret == LDB_SUCCESS) {
- ret = ldb_wait(req->async.handle, LDB_WAIT_ALL);
+ ret = ldb_wait(req->handle, LDB_WAIT_ALL);
}
if (ret != LDB_SUCCESS) {
@@ -600,8 +600,8 @@ int ldb_add(struct ldb_context *ldb,
req->operation = LDB_ADD;
req->op.add.message = message;
req->controls = NULL;
- req->async.context = NULL;
- req->async.callback = NULL;
+ req->context = NULL;
+ req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
/* do request and autostart a transaction */
@@ -632,8 +632,8 @@ int ldb_modify(struct ldb_context *ldb,
req->operation = LDB_MODIFY;
req->op.add.message = message;
req->controls = NULL;
- req->async.context = NULL;
- req->async.callback = NULL;
+ req->context = NULL;
+ req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
/* do request and autostart a transaction */
@@ -661,8 +661,8 @@ int ldb_delete(struct ldb_context *ldb, const struct ldb_dn *dn)
req->operation = LDB_DELETE;
req->op.del.dn = dn;
req->controls = NULL;
- req->async.context = NULL;
- req->async.callback = NULL;
+ req->context = NULL;
+ req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
/* do request and autostart a transaction */
@@ -690,8 +690,8 @@ int ldb_rename(struct ldb_context *ldb, const struct ldb_dn *olddn, const struct
req->op.rename.olddn = olddn;
req->op.rename.newdn = newdn;
req->controls = NULL;
- req->async.context = NULL;
- req->async.callback = NULL;
+ req->context = NULL;
+ req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
/* do request and autostart a transaction */
@@ -718,8 +718,8 @@ int ldb_sequence_number(struct ldb_context *ldb, uint64_t *seq_num)
req->operation = LDB_SEQUENCE_NUMBER;
req->controls = NULL;
- req->async.context = NULL;
- req->async.callback = NULL;
+ req->context = NULL;
+ req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
/* do request and autostart a transaction */