From: Andre Noll Date: Thu, 25 Mar 2010 13:49:47 +0000 (+0100) Subject: Reuse old rsync argv if rsync has to be restarted. X-Git-Tag: v0.1.4~11 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=d28be18d969b6e72021e7229be49c02d3b549794 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. --- 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())