mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 21:10:25 +01:00
core: don't do anything if there are no changes in nm_settings_connection_update_timestamp()
Updating the timestamp marks the keyfile database as dirty. Avoid that, if there is no change. Of course, nm_key_file_db_set_value() itself already checks whether the are any changes, and does nothing if there aren't. Simply perform the check earlier, to do nothing.
This commit is contained in:
parent
6f3ae8a563
commit
c3db3e0044
1 changed files with 7 additions and 1 deletions
|
|
@ -2136,12 +2136,18 @@ void
|
|||
nm_settings_connection_update_timestamp (NMSettingsConnection *self,
|
||||
guint64 timestamp)
|
||||
{
|
||||
NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self);
|
||||
NMSettingsConnectionPrivate *priv;
|
||||
const char *connection_uuid;
|
||||
char sbuf[60];
|
||||
|
||||
g_return_if_fail (NM_IS_SETTINGS_CONNECTION (self));
|
||||
|
||||
priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self);
|
||||
|
||||
if ( priv->timestamp == timestamp
|
||||
&& priv->timestamp_set)
|
||||
return;
|
||||
|
||||
priv->timestamp = timestamp;
|
||||
priv->timestamp_set = TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue