From 5d7b99804acb921496248956542645889b05e928 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 29 Jul 2006 02:00:33 +0000 Subject: r17303: More testing results: Don't try and call a NULL callback, and use the correct parameter, as this is called for more than just 'add'. Andrew Bartlett (This used to be commit be51b7240889bfcc752f92a2920d8b6a2eccecd6) --- source4/dsdb/samdb/ldb_modules/partition.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules/partition.c') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index aa692547ce..c94c843a83 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -164,6 +164,11 @@ static int partition_other_callback(struct ldb_context *ldb, void *context, stru ac = talloc_get_type(context, struct partition_context); + if (!ac->orig_req->callback) { + talloc_free(ares); + return LDB_SUCCESS; + } + if (!ares || (ares->type == LDB_REPLY_EXTENDED && strcmp(ares->response->oid, LDB_EXTENDED_START_TLS_OID))) { @@ -271,7 +276,7 @@ static int partition_replicate(struct ldb_module *module, struct ldb_request *re /* Otherwise, we need to find the backend to fire it to */ /* Find backend */ - backend = find_backend(module, req, req->op.add.message->dn); + backend = find_backend(module, req, dn); /* issue request */ return ldb_next_request(backend, req); -- cgit