Diff between 7e028287ae1a94b47093cfb328645ae1c74a2ea7 and 6f40e88d0bd52d5b25f869d536996f9e462f1643

Changed Files

File Additions Deletions Status
plugins/policy.c +3 -1 modified

Full Patch

diff --git a/plugins/policy.c b/plugins/policy.c
index 0bbdbfc..9a449da 100644
--- a/plugins/policy.c
+++ b/plugins/policy.c
@@ -74,6 +74,7 @@ static GSList *reconnects = NULL;
 static unsigned int service_id = 0;
 static GSList *devices = NULL;
 
+static const bool default_auto_enable = true;
 static bool auto_enable = false;
 
 struct policy_data {
@@ -858,6 +859,7 @@ static int policy_init(void)
 						sizeof(*reconnect_intervals);
 		reconnect_intervals = util_memdup(default_intervals,
 						sizeof(default_intervals));
+		auto_enable = default_auto_enable;
 		goto done;
 	}
 
@@ -895,7 +897,7 @@ static int policy_init(void)
 								&gerr);
 	if (gerr) {
 		g_clear_error(&gerr);
-		auto_enable = true;
+		auto_enable = default_auto_enable;
 	}
 
 	resume_delay = g_key_file_get_integer(