diff options
author | Ralph Boehme <slow@samba.org> | 2018-12-12 14:43:22 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-12-20 03:19:27 +0100 |
commit | 781f5a95edde4cd27627515869bfe2fc626fbb3a (patch) | |
tree | d6b422d7439d8293ae1f906da8e45666aed0d6e3 | |
parent | d792f15ff1406cde7f38ddc5febb08a8b39b90e8 (diff) | |
download | samba-781f5a95edde4cd27627515869bfe2fc626fbb3a.tar.gz |
debug: update logsize checking for per debug-class logfiles
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | lib/util/debug.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c index fb4332f4273..81a1421eb2f 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -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 ) |