Blame SOURCES/rsync-3.1.3-skip-compress.patch

9f927d
diff --git a/loadparm.c b/loadparm.c
9f927d
index 029f358f..534e7b63 100644
9f927d
--- a/loadparm.c
9f927d
+++ b/loadparm.c
9f927d
@@ -449,7 +449,7 @@ static struct parm_struct parm_table[] =
9f927d
 };
9f927d
 
9f927d
 /* Initialise the Default all_vars structure. */
9f927d
-static void reset_all_vars(void)
9f927d
+void reset_daemon_vars(void)
9f927d
 {
9f927d
 	memcpy(&Vars, &Defaults, sizeof Vars);
9f927d
 }
9f927d
@@ -872,7 +872,7 @@ int lp_load(char *pszFname, int globals_only)
9f927d
 {
9f927d
 	bInGlobalSection = True;
9f927d
 
9f927d
-	reset_all_vars();
9f927d
+	reset_daemon_vars();
9f927d
 
9f927d
 	/* We get sections first, so have to start 'behind' to make up. */
9f927d
 	iSectionIndex = -1;
9f927d
diff --git a/main.c b/main.c
9f927d
index 1328c504..9af9e5d3 100644
9f927d
--- a/main.c
9f927d
+++ b/main.c
9f927d
@@ -1681,6 +1681,10 @@ int main(int argc,char *argv[])
9f927d
 
9f927d
 	memset(&stats, 0, sizeof(stats));
9f927d
 
9f927d
+	/* Even a non-daemon runs needs the default config values to be set, e.g.
9f927d
+	 * lp_dont_compress() is queried when no --skip-compress option is set. */
9f927d
+	reset_daemon_vars();
9f927d
+
9f927d
 	if (argc < 2) {
9f927d
 		usage(FERROR);
9f927d
 		exit_cleanup(RERR_SYNTAX);