diff options
author | Simo Sorce <idra@samba.org> | 2006-08-02 00:01:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:20 -0500 |
commit | eb16bc612a5edef2c3eae1a4dd516a71e43b4979 (patch) | |
tree | fb48c11280bc331d738361848abb3242f8eb835c /source4/lib/ldb/ldb_tdb | |
parent | f685635e87923807c9fde843f57c02ded16caf09 (diff) | |
download | samba-eb16bc612a5edef2c3eae1a4dd516a71e43b4979.tar.gz samba-eb16bc612a5edef2c3eae1a4dd516a71e43b4979.tar.bz2 samba-eb16bc612a5edef2c3eae1a4dd516a71e43b4979.zip |
r17370: Fix tdb searches, we need to return an LDAP_REPLY_DONE packet when done.
Awesome how this didn't break everything around...
(This used to be commit 1b3b6176592314e91af9ed911e8a244519dea9aa)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_search.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index ad6f98ea97..2a3781b2f0 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -478,6 +478,7 @@ int ltdb_search(struct ldb_module *module, struct ldb_request *req) { struct ltdb_private *ltdb = talloc_get_type(module->private_data, struct ltdb_private); struct ltdb_context *ltdb_ac; + struct ldb_reply *ares; int ret; if ((req->op.search.base == NULL || req->op.search.base->comp_num == 0) && @@ -521,6 +522,20 @@ int ltdb_search(struct ldb_module *module, struct ldb_request *req) req->handle->status = ret; } + /* Finally send an LDB_REPLY_DONE packet when searching is finished */ + + ares = talloc_zero(req, struct ldb_reply); + if (!ares) { + ltdb_unlock_read(module); + return LDB_ERR_OPERATIONS_ERROR; + } + + req->handle->state = LDB_ASYNC_DONE; + ares->type = LDB_REPLY_DONE; + + ret = req->callback(module->ldb, req->context, ares); + req->handle->status = ret; + ltdb_unlock_read(module); return LDB_SUCCESS; |