summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-18 23:29:11 +0100
committerMichael Adam <obnox@samba.org>2008-03-21 02:25:55 +0100
commit7621b4c3d80f411aac6e40ea5cce787cec108af5 (patch)
treea29f96067b1b90fa0428dfbfbac56334b9fc6438 /source3/param
parent77dd53ad5c2568a2f06d4ecd524c971ae967b17b (diff)
downloadsamba-7621b4c3d80f411aac6e40ea5cce787cec108af5.tar.gz
samba-7621b4c3d80f411aac6e40ea5cce787cec108af5.tar.bz2
samba-7621b4c3d80f411aac6e40ea5cce787cec108af5.zip
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)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c14
1 files changed, 5 insertions, 9 deletions
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;
}
}