From d28be18d969b6e72021e7229be49c02d3b549794 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 25 Mar 2010 14:49:47 +0100 Subject: [PATCH] Reuse old rsync argv if rsync has to be restarted. If rsync must be restarted due to an exit code of 12 or 13, create_rsync_argv() was called even if the old rsync_argv should be reused in this case. This (correctly) triggers the assertion assert(!name_of_reference_snapshot); in create_rsync_argv(). Fix this by not calling create_rsync_argv() if there is a reference snapshot. --- dss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dss.c b/dss.c index 347268e..68efc2b 100644 --- a/dss.c +++ b/dss.c @@ -1118,8 +1118,10 @@ static int select_loop(void) case HS_POST_RUNNING: continue; case HS_PRE_SUCCESS: - free_rsync_argv(rsync_argv); - create_rsync_argv(&rsync_argv, ¤t_snapshot_creation_time); + if (!name_of_reference_snapshot) { + free_rsync_argv(rsync_argv); + create_rsync_argv(&rsync_argv, ¤t_snapshot_creation_time); + } /* fall through */ case HS_NEEDS_RESTART: if (!next_snapshot_is_due()) -- 2.39.2