From 5bc0848fc73f96879fdb5d398272ead7fee39157 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sat, 18 Dec 2010 05:29:20 +0200 Subject: [PATCH] s4-dsdb_schema: Copy info needed for Schema refresh in dsdb_schema_copy_shallow Just 'refresh_fn' and 'loaded_from_module' are copied. I left 'reload_seq_number' set to 0 intentionally, so that this Schema cache will looks like a very old one to ,refresh_fn'. This way, if this shallow copy is attached to LDB, it will be refreshed as soon as possible by 'refresh_fn'. --- source4/dsdb/schema/schema_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 00170a2d39..62111c5ed8 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -99,6 +99,10 @@ struct dsdb_schema *dsdb_schema_copy_shallow(TALLOC_CTX *mem_ctx, goto failed; } + /* leave reload_seq_number = 0 so it will be refresh ASAP */ + schema_copy->refresh_fn = schema->refresh_fn; + schema_copy->loaded_from_module = schema->loaded_from_module; + return schema_copy; failed: -- 2.34.1