From 257598424e63c2cfa118b5ea84b7dc719d1dc5aa Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 7 Mar 2006 21:16:35 +0000 Subject: r13996: simplify ldb_async_wait() some more (This used to be commit ef1b3e6368179fe86ae07b8d00e4668090175551) --- source4/lib/ldb/common/ldb.c | 2 +- source4/lib/ldb/include/ldb.h | 2 +- source4/lib/ldb/ldb_ildap/ldb_ildap.c | 10 +++++----- source4/lib/ldb/ldb_ldap/ldb_ldap.c | 10 +++++----- source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 10 +++++----- source4/lib/ldb/ldb_tdb/ldb_search.c | 2 +- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 8 ++++---- source4/lib/ldb/modules/sort.c | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index b304cf6afc..ed3351dc5e 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -231,7 +231,7 @@ int ldb_transaction_cancel(struct ldb_context *ldb) return status; } -int ldb_async_wait(struct ldb_context *ldb, struct ldb_async_handle *handle, enum ldb_async_wait_type type) +int ldb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type) { return handle->module->ops->async_wait(handle, type); } diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index b3ea17d85d..dbe929246b 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -664,7 +664,7 @@ struct ldb_request { int ldb_request(struct ldb_context *ldb, struct ldb_request *request); -int ldb_async_wait(struct ldb_context *ldb, struct ldb_async_handle *handle, enum ldb_async_wait_type type); +int ldb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type); /** Initialise ldbs' global information diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 45323b5550..f309262a55 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -539,7 +539,7 @@ static int ildb_search_bytree(struct ldb_module *module, const struct ldb_dn *ba res, &ildb_search_sync_callback, ildb->ldap->timeout, &handle); if (ret == LDB_SUCCESS) { - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); } @@ -616,7 +616,7 @@ static int ildb_add(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -688,7 +688,7 @@ static int ildb_modify(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -741,7 +741,7 @@ static int ildb_delete(struct ldb_module *module, const struct ldb_dn *dn) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -813,7 +813,7 @@ static int ildb_rename(struct ldb_module *module, const struct ldb_dn *olddn, co if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 8406ab384b..5a4d911218 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -398,7 +398,7 @@ static int lldb_search_bytree(struct ldb_module *module, const struct ldb_dn *ba res, &lldb_search_sync_callback, lldb->timeout, &handle); if (ret == LDB_SUCCESS) { - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); } @@ -477,7 +477,7 @@ static int lldb_add(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -552,7 +552,7 @@ static int lldb_modify(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -615,7 +615,7 @@ static int lldb_delete(struct ldb_module *module, const struct ldb_dn *dn) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -698,7 +698,7 @@ static int lldb_rename(struct ldb_module *module, const struct ldb_dn *olddn, co if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c index a8dc8fe3a2..d9d9269de4 100644 --- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c +++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c @@ -1085,7 +1085,7 @@ static int lsql_search_bytree(struct ldb_module * module, const struct ldb_dn* b &handle); if (ret == LDB_SUCCESS) { - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); } @@ -1247,7 +1247,7 @@ static int lsql_add(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -1461,7 +1461,7 @@ static int lsql_modify(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -1540,7 +1540,7 @@ static int lsql_delete(struct ldb_module *module, const struct ldb_dn *dn) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -1621,7 +1621,7 @@ static int lsql_rename(struct ldb_module *module, const struct ldb_dn *olddn, co if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 5155031055..7e14a3000a 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -596,7 +596,7 @@ int ltdb_search_bytree(struct ldb_module *module, const struct ldb_dn *base, &handle); if (ret == LDB_SUCCESS) { - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); } diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index c0e070de69..a77553dcb8 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -309,7 +309,7 @@ static int ltdb_add(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -413,7 +413,7 @@ static int ltdb_delete(struct ldb_module *module, const struct ldb_dn *dn) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -786,7 +786,7 @@ static int ltdb_modify(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; @@ -872,7 +872,7 @@ static int ltdb_rename(struct ldb_module *module, const struct ldb_dn *olddn, co if (ret != LDB_SUCCESS) return ret; - ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(handle, LDB_WAIT_ALL); talloc_free(handle); return ret; diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c index a37442b41f..82b589c749 100644 --- a/source4/lib/ldb/modules/sort.c +++ b/source4/lib/ldb/modules/sort.c @@ -525,7 +525,7 @@ static int server_sort_async_wait(struct ldb_async_handle *handle, enum ldb_asyn ac = talloc_get_type(handle->private_data, struct sort_async_context); - ret = ldb_async_wait(handle->module->ldb, ac->req->async.handle, type); + ret = ldb_async_wait(ac->req->async.handle, type); if (ret != LDB_SUCCESS) { handle->status = ret; -- cgit