diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-02 19:56:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-02 19:56:54 +0000 |
commit | 87ea010ae14b2dc9a3e5b9d64ca9e63ec9de91f8 (patch) | |
tree | 23e61d415c09a0d44584fa4aeaf5b07eccc5735e /source3/param/loadparm.c | |
parent | 2a664807c53c2af335b1473bfef1a03071e4852c (diff) | |
download | samba-87ea010ae14b2dc9a3e5b9d64ca9e63ec9de91f8.tar.gz samba-87ea010ae14b2dc9a3e5b9d64ca9e63ec9de91f8.tar.xz samba-87ea010ae14b2dc9a3e5b9d64ca9e63ec9de91f8.zip |
Fix continual scanning of smb.conf if an include file doesn't exist. Found
by Herb.
Jeremy.
(This used to be commit f4f2a62740625495fa2dae03751829a4528713cc)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index af9ec06d950..790d73d3cbd 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2242,10 +2242,12 @@ static void add_to_file_list(const char *fname, const char *subfname) return; } file_lists = f; + f->modtime = file_modtime(subfname); + } else { + time_t t = file_modtime(subfname); + if (t) + f->modtime = t; } - - f->modtime = file_modtime(subfname); - } /******************************************************************* @@ -2256,8 +2258,7 @@ BOOL lp_file_list_changed(void) struct file_lists *f = file_lists; DEBUG(6, ("lp_file_list_changed()\n")); - while (f) - { + while (f) { pstring n2; time_t mod_time; @@ -2269,8 +2270,7 @@ BOOL lp_file_list_changed(void) mod_time = file_modtime(n2); - if ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0)) - { + if (mod_time && ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0))) { DEBUGADD(6, ("file %s modified: %s\n", n2, ctime(&mod_time))); |