diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-06 19:38:47 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-06 20:24:19 +0100 |
commit | 889fa1cac55b79a268dbbd63d836a0917b8a79a3 (patch) | |
tree | 55563c315772f749869ca8076036e69ce75772fa /source4 | |
parent | 9ff8428c6f5f965c0811218d0f202bdceb1f1a0f (diff) | |
download | samba-889fa1cac55b79a268dbbd63d836a0917b8a79a3.tar.gz samba-889fa1cac55b79a268dbbd63d836a0917b8a79a3.tar.bz2 samba-889fa1cac55b79a268dbbd63d836a0917b8a79a3.zip |
ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"
And remove in "ltdb_add_internal" a cache loading call which has been present
twice.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index a498d541d3..0e91b5bba6 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -283,15 +283,6 @@ static int ltdb_add_internal(struct ldb_module *module, int ret = LDB_SUCCESS; unsigned int i; - ret = ltdb_check_special_dn(module, msg); - if (ret != LDB_SUCCESS) { - return ret; - } - - if (ltdb_cache_load(module) != 0) { - return LDB_ERR_OPERATIONS_ERROR; - } - for (i=0;i<msg->num_elements;i++) { struct ldb_message_element *el = &msg->elements[i]; const struct ldb_schema_attribute *a = ldb_schema_attribute_by_name(ldb, el->name); @@ -340,6 +331,11 @@ static int ltdb_add(struct ltdb_context *ctx) struct ldb_request *req = ctx->req; int ret = LDB_SUCCESS; + ret = ltdb_check_special_dn(module, req->op.add.message); + if (ret != LDB_SUCCESS) { + return ret; + } + ldb_request_set_state(req, LDB_ASYNC_PENDING); if (ltdb_cache_load(module) != 0) { |