summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-21 09:16:45 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-21 10:44:04 +0100
commitd965ff05c9923c8a0e440e905d0d9fe662cc5db0 (patch)
tree88b1ab945e9147b10dad13b6a67b0f2bfef4bb5d /source4/lib/ldb/common
parent53293f2ccba357eab6c4325a08517660e979c1d8 (diff)
downloadsamba-d965ff05c9923c8a0e440e905d0d9fe662cc5db0.tar.gz
samba-d965ff05c9923c8a0e440e905d0d9fe662cc5db0.tar.bz2
samba-d965ff05c9923c8a0e440e905d0d9fe662cc5db0.zip
s4:ldb: remove dependency to samba4's events wrapper
metze
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 4443362448..fe55d1499a 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -48,7 +48,7 @@ struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx)
/* FIXME: Hack a new event context so that CMD line utilities work
* until we have them all converted */
if (ev_ctx == NULL) {
- ev_ctx = event_context_init(talloc_autofree_context());
+ ev_ctx = tevent_context_init(talloc_autofree_context());
}
ret = ldb_setup_wellknown_attributes(ldb);
@@ -394,6 +394,7 @@ static int ldb_autotransaction_request(struct ldb_context *ldb,
int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
{
struct tevent_context *ev;
+ int ret;
if (!handle) {
return LDB_ERR_UNAVAILABLE;
@@ -410,7 +411,10 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
switch (type) {
case LDB_WAIT_NONE:
- event_loop_once(ev);
+ ret = tevent_loop_once(ev);
+ if (ret != 0) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
if (handle->state == LDB_ASYNC_DONE ||
handle->status != LDB_SUCCESS) {
return handle->status;
@@ -419,7 +423,10 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
case LDB_WAIT_ALL:
while (handle->state != LDB_ASYNC_DONE) {
- event_loop_once(ev);
+ ret = tevent_loop_once(ev);
+ if (ret != 0) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
if (handle->status != LDB_SUCCESS) {
return handle->status;
}