From 72af2c1831beedc3c04bce6fc3c295accd8326b5 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 5 Sep 1997 17:16:21 +0000 Subject: added debug reporting to file listing / mod_time() checking routine. lp_file_list_changed(). (This used to be commit 727fcfae1b62bb509f0a9f5304dad363ef38345a) --- source3/param/loadparm.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 8c048ad079..ad9bf83886 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1395,11 +1395,26 @@ check if a config file has changed date BOOL lp_file_list_changed(void) { struct file_lists *f = file_lists; - while (f) { + DEBUG(6,("lp_file_list_changed()\n")); + + while (f) + { pstring n2; + time_t mod_time; + strcpy(n2,f->name); standard_sub_basic(n2); - if (f->modtime != file_modtime(n2)) return(True); + + DEBUG(6,("file %s -> %s last mod_time: %s\n", + f->name, n2, ctime(&f->modtime))); + + mod_time = file_modtime(n2); + + if (f->modtime != mod_time) + { + DEBUG(6,("file %s modified: %s\n", n2, ctime(&mod_time))); + return(True); + } f = f->next; } return(False); -- cgit