summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-03-03 20:01:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:13 -0500
commit509814bd037a3c73fea4ab92b531c25964f34dfa (patch)
treed872537971ca08cf87c1cd3147009c0aa3c18c17 /source4/lib/ldb/ldb_tdb
parent6ef61825541131e16a03975cdbd344e2bbebf810 (diff)
downloadsamba-509814bd037a3c73fea4ab92b531c25964f34dfa.tar.gz
samba-509814bd037a3c73fea4ab92b531c25964f34dfa.tar.bz2
samba-509814bd037a3c73fea4ab92b531c25964f34dfa.zip
r13823: make async_wait part of the modules ops
(This used to be commit b4202cf030d5f154f0f94f5f501ecd648ba5c48f)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 46f560f817..5ffd45aa3b 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -475,7 +475,7 @@ static int ltdb_search_full(struct ldb_async_handle *handle)
static int ltdb_search_sync_callback(struct ldb_context *ldb, void *context, struct ldb_async_result *ares)
{
- struct ldb_result *res;
+ struct ldb_result *res = NULL;
if (!context) {
ldb_set_errstring(ldb, talloc_strdup(ldb, "NULL Context in callback"));
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 04766c53a1..da9596199a 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -917,7 +917,7 @@ static int ltdb_del_trans(struct ldb_module *module)
return LDB_SUCCESS;
}
-static int ltdb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int ltdb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
return handle->status;
}
@@ -1038,7 +1038,8 @@ static const struct ldb_module_ops ltdb_ops = {
.request = ltdb_request,
.start_transaction = ltdb_start_trans,
.end_transaction = ltdb_end_trans,
- .del_transaction = ltdb_del_trans
+ .del_transaction = ltdb_del_trans,
+ .async_wait = ltdb_async_wait
};
@@ -1104,7 +1105,5 @@ int ltdb_connect(struct ldb_context *ldb, const char *url,
ldb->modules->ops = &ltdb_ops;
ldb->sequence_number = ltdb_sequence_number;
- ldb->async_wait = &ltdb_async_wait;
-
return 0;
}