Author: mkhl Date: 2006-08-02 01:25:05 +0000 (Wed, 02 Aug 2006) New Revision: 17371
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17371 Log: Merge from mainline, r17370. Modified: branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_search.c Changeset: Modified: branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_search.c =================================================================== --- branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_search.c 2006-08-02 00:01:09 UTC (rev 17370) +++ branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_search.c 2006-08-02 01:25:05 UTC (rev 17371) @@ -478,6 +478,7 @@ { 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 @@ 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;