]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Extra logging for inotify code.
authorSimon Kelley <simon@thekelleys.org.uk>
Tue, 3 Feb 2015 21:52:48 +0000 (21:52 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 3 Feb 2015 21:52:48 +0000 (21:52 +0000)
src/cache.c
src/inotify.c
src/option.c

index 117ae279fd4ed60a5585ef1da8b98bba93b27b73..43245b771b53df7b0ff25c4055f0ca2c40b9e3de 100644 (file)
@@ -1022,11 +1022,10 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size, struct cr
   fclose(f);
   
   if (rhash)
-    {
-      rehash(name_count); 
-      my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
-    }
-
+    rehash(name_count); 
+  
+  my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
+  
   return name_count;
 }
            
index 6f4cd79e003025cbf2df940c2ec735f16e821b63..44ce0c9af05195b154f579927f5f82e5e5f15543 100644 (file)
@@ -192,7 +192,9 @@ int inotify_check(time_t now)
                    strcpy(path, ah->fname);
                    strcat(path, "/");
                    strcat(path, in->name);
-                   
+                    
+                   my_syslog(LOG_INFO, _("inotify, new or changed file %s"), path);
+
                    if (ah->flags & AH_HOSTS)
                      {
                        read_hostsfile(path, ah->index, 0, NULL, 0);
index cb4e76ba0aa2b4d96086d6ab63549031e96fcc50..e4b4865d07a5e0fec9776e2b9508482282fa7525 100644 (file)
@@ -4068,11 +4068,13 @@ static void read_file(char *file, FILE *f, int hard_opt)
 #ifdef HAVE_DHCP
 int option_read_dynfile(char *file, int flags)
 {
+  my_syslog(MS_DHCP | LOG_INFO, _("read %s"), file);
+  
   if (flags & AH_DHCP_HST)
     return one_file(file, LOPT_BANK);
   else if (flags & AH_DHCP_OPT)
     return one_file(file, LOPT_OPTS);
-
+  
   return 0;
 }
 #endif