]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Skip unnecessary check whether next snapshot is due.
authorAndre Noll <maan@systemlinux.org>
Wed, 12 May 2010 08:23:18 +0000 (10:23 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 12 May 2010 08:23:18 +0000 (10:23 +0200)
If the status of the create hook is PRE_SUCCESS, we _know_ that
the next snapshot is due.

dss.c

diff --git a/dss.c b/dss.c
index c02658b781270037d2beaf1f31d8f43aebc9b8e1..e4415f5f7c4d4a789f508899e715d9492bb387ee 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -1126,7 +1126,10 @@ static int select_loop(void)
                                free_rsync_argv(rsync_argv);
                                create_rsync_argv(&rsync_argv, &current_snapshot_creation_time);
                        }
-                       /* fall through */
+                       ret = create_snapshot(rsync_argv);
+                       if (ret < 0)
+                               goto out;
+                       continue;
                case HS_NEEDS_RESTART:
                        if (!next_snapshot_is_due())
                                continue;