mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 22:00:29 +01:00
keep-alive: drop unused nm_keep_alive_set_forced()
set-forced is currently unused, so drop it. NMKeepAlive in principle determines the alive-status based on multiple aspects, that in combination render the instance alive or dead. These aspects cooperate in a particular way. By default, a keep-alive instance should be alive. If there are conditions enabled that further determine the alive-state, then these conditions cooperate in a particular way. As it was, the force-flag would just overrule them all. But is that useful? The nm_keep_alive_set_forced() API also means that only one user caller can have control over the flag. Independent callers cannot cooperate on setting the flag, because there is no reference-counting or registered handles. At least today, it's unclear whether this flag really should overrule all other conditions and how this flag would actually be used. Drop it for now.
This commit is contained in:
parent
f95a526366
commit
c9354cb477
2 changed files with 0 additions and 20 deletions
|
|
@ -46,7 +46,6 @@ typedef struct {
|
|||
bool armed:1;
|
||||
bool disarmed:1;
|
||||
|
||||
bool forced:1;
|
||||
bool alive:1;
|
||||
bool dbus_client_confirmed:1;
|
||||
} NMKeepAlivePrivate;
|
||||
|
|
@ -88,9 +87,6 @@ _is_alive (NMKeepAlive *self)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (priv->forced)
|
||||
return TRUE;
|
||||
|
||||
if ( priv->connection
|
||||
&& NM_FLAGS_HAS (nm_settings_connection_get_flags (priv->connection),
|
||||
NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE))
|
||||
|
|
@ -129,19 +125,6 @@ nm_keep_alive_is_alive (NMKeepAlive *self)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
void
|
||||
nm_keep_alive_set_forced (NMKeepAlive *self, gboolean forced)
|
||||
{
|
||||
NMKeepAlivePrivate *priv = NM_KEEP_ALIVE_GET_PRIVATE (self);
|
||||
|
||||
if (priv->forced != (!!forced)) {
|
||||
priv->forced = forced;
|
||||
_notify_alive (self);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
connection_flags_changed (NMSettingsConnection *connection,
|
||||
NMKeepAlive *self)
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@ gboolean nm_keep_alive_is_alive (NMKeepAlive *self);
|
|||
void nm_keep_alive_arm (NMKeepAlive *self);
|
||||
void nm_keep_alive_disarm (NMKeepAlive *self);
|
||||
|
||||
void nm_keep_alive_set_forced (NMKeepAlive *self,
|
||||
gboolean forced);
|
||||
|
||||
void nm_keep_alive_set_settings_connection_watch_visible (NMKeepAlive *self,
|
||||
NMSettingsConnection *connection);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue