From b206a365eade7fbd2defddbadf14ca293409ede3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 9 Aug 2011 12:55:57 +1000 Subject: move schema_fill_constructed() call to dsdb_setup_sorted_accessors() --- source4/dsdb/schema/schema_set.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/dsdb/schema') diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 53bfa72ff3..8cb06bb70e 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -321,6 +321,7 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb, struct dsdb_attribute *a; unsigned int i; unsigned int num_int_id; + int ret; /* free all caches */ dsdb_sorted_accessors_free(schema); @@ -405,6 +406,12 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb, dsdb_setup_attribute_shortcuts(ldb, schema); + ret = schema_fill_constructed(schema); + if (ret != LDB_SUCCESS) { + dsdb_sorted_accessors_free(schema); + return ret; + } + return LDB_SUCCESS; failed: @@ -426,11 +433,6 @@ int dsdb_set_schema(struct ldb_context *ldb, struct dsdb_schema *schema) return ret; } - ret = schema_fill_constructed(schema); - if (ret != LDB_SUCCESS) { - return ret; - } - old_schema = ldb_get_opaque(ldb, "dsdb_schema"); ret = ldb_set_opaque(ldb, "dsdb_schema", schema); -- cgit