From d35bda0ffd5bea57087dba9a6da8c20df8fa165c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 14 Jan 2008 18:31:11 +0100 Subject: Add detection for need of update to the registry db. This only detects if the tdb sequence number has changed since the data has last been read. Michael (This used to be commit 3f081ebeadf30a7943723703ecae479e0412c60c) --- source3/registry/reg_api.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/registry/reg_api.c') diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index bb410e646b..8bbdb6abd3 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -27,7 +27,9 @@ static WERROR fill_value_cache(struct registry_key *key) { if (key->values != NULL) { - return WERR_OK; + if (!reg_values_need_update(key->key, key->values)) { + return WERR_OK; + } } if (!(key->values = TALLOC_ZERO_P(key, REGVAL_CTR))) { @@ -44,7 +46,9 @@ static WERROR fill_value_cache(struct registry_key *key) static WERROR fill_subkey_cache(struct registry_key *key) { if (key->subkeys != NULL) { - return WERR_OK; + if (!reg_subkeys_need_update(key->key, key->subkeys)) { + return WERR_OK; + } } if (!(key->subkeys = TALLOC_ZERO_P(key, REGSUBKEY_CTR))) { -- cgit