summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-03 14:33:23 +0200
committerThomas Haller <thaller@redhat.com>2019-05-07 16:41:21 +0200
commit8a78493de1c33d879082e55edca1ee6e672efc40 (patch)
treefd4283279e5f0daf66de8c7e2e0b7ed21f98692d /src/nm-manager.c
parentb0693863c1f6c6bf31033499e222a6f6135411eb (diff)
downloadNetworkManager-8a78493de1c33d879082e55edca1ee6e672efc40.tar.gz
settings: cache keyfile databases for "timestamps" and "seen-bssids"
Only read the keyfile databases once and cache them for the remainder of the program. - this avoids the overhead of opening the file over and over again. - it also avoids the data changing without us expecting it. The state files are internal and we don't support changing it outside of NetworkManager. So in the base case we read the same data over and over. In the worst case, we read different data but are not interested in handling the changes. - only write the file when the content changes or before exiting (normally). - better log what is happening. - our state files tend to grow as we don't garbage collect old entries. Keeping this all in memory might be problematic. However, the right solution for this is that we come up with some form of garbage collection so that the state files are reaonsably small to begin with.
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index c0cd15c0cd..3622a0a5ad 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -7313,7 +7313,7 @@ periodic_update_active_connection_timestamps (gpointer user_data)
c_list_for_each_entry (ac, &priv->active_connections_lst_head, active_connections_lst) {
if (nm_active_connection_get_state (ac) == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) {
nm_settings_connection_update_timestamp (nm_active_connection_get_settings_connection (ac),
- (guint64) time (NULL), FALSE);
+ (guint64) time (NULL));
}
}
return G_SOURCE_CONTINUE;