1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From d06dc31df31a5a872f82b142d862bc44429ebd53 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Wed, 10 Nov 2010 16:14:51 +0100
Subject: [PATCH] keyfile: quiet keyfile plugin when re-read connection is the same as in-memory one
It occurs, for example, when NM updates connection's timestamp.
---
system-settings/plugins/keyfile/plugin.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/system-settings/plugins/keyfile/plugin.c b/system-settings/plugins/keyfile/plugin.c
index 7257638..5a927ce 100644
--- a/system-settings/plugins/keyfile/plugin.c
+++ b/system-settings/plugins/keyfile/plugin.c
@@ -212,15 +212,18 @@ dir_changed (GFileMonitor *monitor,
break;
case G_FILE_MONITOR_EVENT_CREATED:
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
- PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name);
-
if (connection) {
/* Update */
NMKeyfileConnection *tmp;
tmp = nm_keyfile_connection_new (name, &error);
if (tmp) {
- update_connection_settings (connection, tmp);
+ if (!nm_connection_compare (NM_CONNECTION (connection),
+ NM_CONNECTION (tmp),
+ NM_SETTING_COMPARE_FLAG_EXACT)) {
+ PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name);
+ update_connection_settings (connection, tmp);
+ }
g_object_unref (tmp);
} else {
/* Error; remove the connection */
@@ -230,6 +233,8 @@ dir_changed (GFileMonitor *monitor,
remove_connection (SC_PLUGIN_KEYFILE (config), connection, name);
}
} else {
+ PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name);
+
/* New */
connection = nm_keyfile_connection_new (name, &error);
if (connection) {
--
1.7.2.3
|