debug: update logsize checking for per debug-class logfiles
authorRalph Boehme <slow@samba.org>
Wed, 12 Dec 2018 13:43:22 +0000 (14:43 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 20 Dec 2018 02:19:27 +0000 (03:19 +0100)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/debug.c

index fb4332f..81a1421 100644 (file)
@@ -1266,7 +1266,21 @@ static void do_one_check_log_size(off_t maxlog, int *_fd, const char *logfile)
 
 static void do_check_log_size(off_t maxlog)
 {
+       size_t i;
+
        do_one_check_log_size(maxlog, &state.fd, state.debugf);
+
+       for (i = DBGC_ALL + 1; i < debug_num_classes; i++) {
+               if (dbgc_config[i].fd == -1) {
+                       continue;
+               }
+               if (dbgc_config[i].logfile == NULL) {
+                       continue;
+               }
+               do_one_check_log_size(maxlog,
+                                     &dbgc_config[i].fd,
+                                     dbgc_config[i].logfile);
+       }
 }
 
 void check_log_size( void )