]> git.tuebingen.mpg.de Git - dss.git/blobdiff - dss.c
Loglevel adjustments.
[dss.git] / dss.c
diff --git a/dss.c b/dss.c
index 612406038c24052150710afe2a90e77e8b1332d7..238d8403659bd377a2fea92aad0713264cdbcd5e 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -214,7 +214,7 @@ static int remove_redundant_snapshot(struct snapshot_list *sl)
        struct snapshot *s;
        unsigned missing = 0;
 
-       DSS_INFO_LOG("looking for intervals containing too many snapshots\n");
+       DSS_DEBUG_LOG("looking for intervals containing too many snapshots\n");
        for (interval = conf.num_intervals_arg - 1; interval >= 0; interval--) {
                unsigned keep = desired_number_of_snapshots(interval, conf.num_intervals_arg);
                unsigned num = sl->interval_count[interval];
@@ -271,7 +271,7 @@ static int remove_outdated_snapshot(struct snapshot_list *sl)
        int i, ret;
        struct snapshot *s;
 
-       DSS_INFO_LOG("looking for snapshots belonging to intervals greater than %d\n",
+       DSS_DEBUG_LOG("looking for snapshots belonging to intervals greater than %d\n",
                conf.num_intervals_arg);
        FOR_EACH_SNAPSHOT(s, i, sl) {
                if (s->interval <= conf.num_intervals_arg)
@@ -747,19 +747,24 @@ static int select_loop(void)
 {
        int ret;
        /* check every 60 seconds for free disk space */
-       struct timeval tv = {.tv_sec = 60, .tv_usec = 0};
+       struct timeval tv;
 
        for (;;) {
                fd_set rfds;
                int low_disk_space;
                char **rsync_argv;
-               struct timeval now, *tvp = &tv;
+               struct timeval now, *tvp;
 
                if (rm_pid)
                        tvp = NULL; /* sleep until rm process dies */
+               else { /* sleep one minute */
+                       tv.tv_sec = 60;
+                       tv.tv_usec = 0;
+                       tvp = &tv;
+               }
                FD_ZERO(&rfds);
                FD_SET(signal_pipe, &rfds);
-               DSS_DEBUG_LOG("tvp: %p, tv_sec: %lu\n", tvp, (long unsigned) tv.tv_sec);
+               DSS_DEBUG_LOG("tvp: %p, tv_sec : %lu\n", tvp, (long unsigned) tv.tv_sec);
                ret = dss_select(signal_pipe + 1, &rfds, NULL, tvp);
                if (ret < 0)
                        return ret;