summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/skel.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-05-29 01:30:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:41 -0500
commit3a4d7eb2c08a06fac89c34d132f1c32751ce7ad5 (patch)
tree7d34281bba70aaa79d7527b823f00f625836dc3a /source4/lib/ldb/modules/skel.c
parent0bd3636a1249dd55f7595c06892e2db65af18bfc (diff)
downloadsamba-3a4d7eb2c08a06fac89c34d132f1c32751ce7ad5.tar.gz
samba-3a4d7eb2c08a06fac89c34d132f1c32751ce7ad5.tar.bz2
samba-3a4d7eb2c08a06fac89c34d132f1c32751ce7ad5.zip
r15927: Optimize ldb module traverse while keeping the API intact.
I was sick of jumping inot each module for each request, even the ones not handle by that module. (This used to be commit 7d65105e885a28584e8555453b90232c43a92bf7)
Diffstat (limited to 'source4/lib/ldb/modules/skel.c')
-rw-r--r--source4/lib/ldb/modules/skel.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c
index 2f3c2e8b57..2adef580b1 100644
--- a/source4/lib/ldb/modules/skel.c
+++ b/source4/lib/ldb/modules/skel.c
@@ -97,28 +97,7 @@ static int skel_destructor(struct ldb_module *ctx)
static int skel_request(struct ldb_module *module, struct ldb_request *req)
{
- switch (req->operation) {
-
- case LDB_REQ_SEARCH:
- return skel_search(module, req);
-
- case LDB_REQ_ADD:
- return skel_add(module, req);
-
- case LDB_REQ_MODIFY:
- return skel_modify(module, req);
-
- case LDB_REQ_DELETE:
- return skel_delete(module, req);
-
- case LDB_REQ_RENAME:
- return skel_rename(module,
- req);
-
- default:
- return ldb_next_request(module, req);
-
- }
+ return ldb_next_request(module, req);
}
static int skel_init(struct ldb_module *ctx)
@@ -141,6 +120,11 @@ static int skel_init(struct ldb_module *ctx)
static const struct ldb_module_ops skel_ops = {
.name = "skel",
.init_context = skel_init,
+ .search = skel_search,
+ .add = skel_add,
+ .modify = skel_modify,
+ .del = skel_delete,
+ .rename = skel_rename,
.request = skel_request,
.start_transaction = skel_start_trans,
.end_transaction = skel_end_trans,