typedef struct cf_file_t {
char const *filename;
CONF_SECTION *cs;
- bool input;
struct stat buf;
} cf_file_t;
file->filename = filename;
file->cs = cs;
- file->input = true;
if (fstat(fd, &file->buf) == 0) {
#ifdef S_IWOTH
file->filename = filename;
file->cs = cs;
- file->input = true;
if (stat(filename, &file->buf) < 0) {
ERROR("Unable to check file \"%s\": %s", filename, fr_syserror(errno));
* The file changed, we'll need to re-read it.
*/
if (buf.st_mtime != file->buf.st_mtime) {
- if (!file->input) {
- cb->rcode |= CF_FILE_CONFIG;
- } else {
- (void) cb->callback(cb->modules, file->cs);
+
+ if (cb->callback(cb->modules, file->cs)) {
cb->rcode |= CF_FILE_MODULE;
+ DEBUG3("HUP: Changed module file %s", file->filename);
+ } else {
+ DEBUG3("HUP: Changed config file %s", file->filename);
+ cb->rcode |= CF_FILE_CONFIG;
}
}