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 c02658b..e4415f5 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;