The Samba-Bugzilla – Attachment 2982 Details for
Bug 5090
Provisioning: New problems with ldb
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Another update of ltdb_search
ldb_search.diff (text/plain), 2.24 KB, created by
Matthias Dieter Wallnöfer
on 2007-11-18 11:15:08 UTC
(
hide
)
Description:
Another update of ltdb_search
Filename:
MIME Type:
Creator:
Matthias Dieter Wallnöfer
Created:
2007-11-18 11:15:08 UTC
Size:
2.24 KB
patch
obsolete
>Index: lib/ldb/ldb_tdb/ldb_search.c >=================================================================== >--- lib/ldb/ldb_tdb/ldb_search.c (revision 26023) >+++ lib/ldb/ldb_tdb/ldb_search.c (working copy) >@@ -483,12 +483,18 @@ > ret = tdb_traverse_read(ltdb->tdb, search_func, handle); > } > >- if (ret == -1) { >- handle->status = LDB_ERR_OPERATIONS_ERROR; >+ if (ret == -1) { >+ ret = LDB_ERR_OPERATIONS_ERROR; >+ } else { >+ ret = LDB_SUCCESS; > } > >- handle->state = LDB_ASYNC_DONE; >- return LDB_SUCCESS; >+ if (ret == LDB_SUCCESS) { >+ handle->status = ret; >+ handle->state = LDB_ASYNC_DONE; >+ } >+ >+ return ret; > } > > /* >@@ -530,14 +536,19 @@ > ldb_asprintf_errstring(module->ldb, > "NULL Base DN invalid for a base search"); > ret = LDB_ERR_INVALID_DN_SYNTAX; >+ break; >+ > case LDB_SCOPE_ONELEVEL: > ldb_asprintf_errstring(module->ldb, > "NULL Base DN invalid for a one-level search"); >- ret = LDB_ERR_INVALID_DN_SYNTAX; >+ ret = LDB_ERR_INVALID_DN_SYNTAX; >+ break; > case LDB_SCOPE_SUBTREE: >+ > default: > /* We accept subtree searches from a NULL base DN, ie over the whole DB */ > ret = LDB_SUCCESS; >+ break; > } > } else if (ldb_dn_is_valid(req->op.search.base) == false) { > >@@ -562,6 +573,7 @@ > ret = LDB_SUCCESS; > } > >+ > ltdb_ac = talloc_get_type(req->handle->private_data, struct ltdb_context); > > ltdb_ac->tree = req->op.search.tree; >@@ -569,7 +581,6 @@ > ltdb_ac->base = req->op.search.base; > ltdb_ac->attrs = req->op.search.attrs; > >- > if (ret == LDB_SUCCESS) { > ret = ltdb_search_indexed(req->handle); > if (ret == LDB_ERR_NO_SUCH_OBJECT) { >@@ -585,30 +596,22 @@ > } > } > >- if (ret != LDB_SUCCESS) { >- req->handle->state = LDB_ASYNC_DONE; >- 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; >+ ret = LDB_ERR_OPERATIONS_ERROR; > } > > req->handle->state = LDB_ASYNC_DONE; >- > if (ret == LDB_SUCCESS) { > ares->type = LDB_REPLY_DONE; >- > ret = req->callback(module->ldb, req->context, ares); >- req->handle->status = ret; > } >- >+ req->handle->status = ret; >+ > ltdb_unlock_read(module); > >- return LDB_SUCCESS; >+ return ret; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5090
:
2977
|
2978
|
2979
|
2980
|
2981
| 2982 |
2983