From 7621b4c3d80f411aac6e40ea5cce787cec108af5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 18 Mar 2008 23:29:11 +0100 Subject: libsmbconf: change smbconf_get_seqnum() to smbconf_changed(). The former seqnum is hidden inside a struct smbconf_csn. And the get_seqnum is united with a changed function that stores the seqnum inside the given csn. Michael (This used to be commit 5b6b90900a1a3eab24cb5612d78f9678a363cf73) --- source3/param/loadparm.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 04fade5789..37d68ba4af 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -71,7 +71,7 @@ extern userdom_struct current_user_info; #endif static bool in_client = False; /* Not in the client by default */ -static uint64_t conf_last_seqnum = 0; +static struct smbconf_csn conf_last_csn; static struct smbconf_ctx *conf_ctx = NULL; #define CONFIG_BACKEND_FILE 0 @@ -6524,7 +6524,8 @@ static bool process_registry_globals(bool (*pfunc)(const char *, const char *)) } ret = pfunc("registry shares", "yes"); - conf_last_seqnum = smbconf_get_seqnum(conf_ctx, NULL, NULL); + /* store the csn */ + smbconf_changed(conf_ctx, &conf_last_csn, NULL, NULL); done: TALLOC_FREE(mem_ctx); @@ -6604,7 +6605,6 @@ bool lp_file_list_changed(void) DEBUG(6, ("lp_file_list_changed()\n")); if (lp_config_backend_is_registry()) { - uint64_t conf_cur_seqnum; if (conf_ctx == NULL) { WERROR werr; werr = smbconf_open(NULL, &conf_ctx); @@ -6614,12 +6614,8 @@ bool lp_file_list_changed(void) return false; } } - conf_cur_seqnum = smbconf_get_seqnum(conf_ctx, NULL, NULL); - if (conf_last_seqnum != conf_cur_seqnum) { - DEBUGADD(6, ("regdb seqnum changed: old = %llu, " - "new = %llu\n", - (unsigned long long)conf_last_seqnum, - (unsigned long long)conf_cur_seqnum)); + if (smbconf_changed(conf_ctx, &conf_last_csn, NULL, NULL)) { + DEBUGADD(6, ("registry config changed\n")); return true; } } -- cgit