From 75ea7bd0045823765e2619456bc79f01e2651345 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 6 Nov 2010 22:49:08 +0100 Subject: s4:descriptor LDB module - by "dsdb_next_callback" we don't need anymore the default operation callback implementations Only customised ones still need to remain. --- source4/dsdb/samdb/ldb_modules/descriptor.c | 35 ++--------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index 935069a00d..321a1010f3 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -477,37 +477,6 @@ static int get_search_oc_callback(struct ldb_request *req, struct ldb_reply *are return LDB_SUCCESS; } - -static int descriptor_op_callback(struct ldb_request *req, struct ldb_reply *ares) -{ - struct descriptor_context *ac; - - ac = talloc_get_type(req->context, struct descriptor_context); - - if (!ares) { - return ldb_module_done(ac->req, NULL, NULL, - LDB_ERR_OPERATIONS_ERROR); - } - - if (ares->type == LDB_REPLY_REFERRAL) { - return ldb_module_send_referral(ac->req, ares->referral); - } - - if (ares->error != LDB_SUCCESS) { - return ldb_module_done(ac->req, ares->controls, - ares->response, ares->error); - } - - if (ares->type != LDB_REPLY_DONE) { - talloc_free(ares); - return ldb_module_done(ac->req, NULL, NULL, - LDB_ERR_OPERATIONS_ERROR); - } - - return ldb_module_done(ac->req, ares->controls, - ares->response, ares->error); -} - static int descriptor_search_callback(struct ldb_request *req, struct ldb_reply *ares) { struct descriptor_context *ac; @@ -650,7 +619,7 @@ static int descriptor_do_mod(struct descriptor_context *ac) ret = ldb_build_mod_req(&mod_req, ldb, ac, msg, ac->req->controls, - ac, descriptor_op_callback, + ac->req, dsdb_next_callback, ac->req); LDB_REQ_SET_LOCATION(mod_req); if (ret != LDB_SUCCESS) { @@ -748,7 +717,7 @@ static int descriptor_do_add(struct descriptor_context *ac) ret = ldb_build_add_req(&add_req, ldb, ac, msg, ac->req->controls, - ac, descriptor_op_callback, + ac->req, dsdb_next_callback, ac->req); LDB_REQ_SET_LOCATION(add_req); if (ret != LDB_SUCCESS) { -- cgit