Re: remote connections 'unsaved' property changes after save() to disk
- From: Enrico Joerns <ejo pengutronix de>
- To: networkmanager-list gnome org
- Subject: Re: remote connections 'unsaved' property changes after save() to disk
- Date: Thu, 10 Nov 2016 12:29:10 +0100
Any ideas, anyone?
On 10/28/2016 03:48 PM, Enrico Joerns wrote:
Hi,
I tried to rely on the result of nm_remote_connection_get_unsaved() to
determine whether a remote connection was saved to disk or not.
If I only save a connection, the status of 'unsaved' becomes false - as
expected. Unfortunately, if I activate the connection afterwards, the
status is changed back to 'true', meaning the connection is unsaved now.
Is that the intended behavior of the 'unsaved' property? The
documentation states that this means the connection changed compared to
the on-disk representation. Now, the only thing that really changes on
disk when re-saving the connection is its time stamp..
I followed the code to this snippet in
src/settings/nm-settings-connection.c:
connection_changed_cb (NMSettingsConnection *self, gpointer unused)
{
set_unsaved (self, TRUE);
_emit_updated (self, FALSE);
}
meaning the connection is set to 'unsaved' unconditionally every time
the connection changes. This also seems to include changes in the
connections status (active, deactivated, ..) which should be completely
irrelevant for the on-disk representation.
Could you clarify why nm behaves this way, or if this is a bug. And if
its intended behavior, do I have a chance to reliably detect whether a
connection was saved either only 'temporary' or really 'persistent'?
Best regards
Enrico
--
Pengutronix e.K. | Enrico Jörns |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]