mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 12:38:10 +02:00
core: rename internal function nm_policy_device_recheck_auto_activate_all_schedule()
The "all" variant is strongly related to nm_policy_device_recheck_auto_activate_schedule().
Rename, so that the names express that better.
(cherry picked from commit 886786ee0b)
This commit is contained in:
parent
073d3a619f
commit
a446ee2e1b
1 changed files with 14 additions and 11 deletions
|
|
@ -72,7 +72,8 @@ typedef struct {
|
||||||
|
|
||||||
guint reset_retries_id; /* idle handler for resetting the retries count */
|
guint reset_retries_id; /* idle handler for resetting the retries count */
|
||||||
|
|
||||||
guint schedule_activate_all_id; /* idle handler for schedule_activate_all(). */
|
guint
|
||||||
|
schedule_activate_all_id; /* idle handler for nm_policy_device_recheck_auto_activate_all_schedule(). */
|
||||||
|
|
||||||
NMPolicyHostnameMode hostname_mode;
|
NMPolicyHostnameMode hostname_mode;
|
||||||
char *orig_hostname; /* hostname at NM start time */
|
char *orig_hostname; /* hostname at NM start time */
|
||||||
|
|
@ -135,7 +136,7 @@ _PRIV_TO_SELF(NMPolicyPrivate *priv)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void update_system_hostname(NMPolicy *self, const char *msg);
|
static void update_system_hostname(NMPolicy *self, const char *msg);
|
||||||
static void schedule_activate_all(NMPolicy *self);
|
static void nm_policy_device_recheck_auto_activate_all_schedule(NMPolicy *self);
|
||||||
static NMDevice *get_default_device(NMPolicy *self, int addr_family);
|
static NMDevice *get_default_device(NMPolicy *self, int addr_family);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
@ -1760,7 +1761,7 @@ reset_connections_retries(gpointer user_data)
|
||||||
|
|
||||||
/* If anything changed, try to activate the newly re-enabled connections */
|
/* If anything changed, try to activate the newly re-enabled connections */
|
||||||
if (changed)
|
if (changed)
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
@ -1858,7 +1859,7 @@ activate_slave_connections(NMPolicy *self, NMDevice *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
@ -2513,7 +2514,7 @@ active_connection_removed(NMManager *manager, NMActiveConnection *active, gpoint
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
schedule_activate_all_cb(gpointer user_data)
|
_device_recheck_auto_activate_all_cb(gpointer user_data)
|
||||||
{
|
{
|
||||||
NMPolicy *self = user_data;
|
NMPolicy *self = user_data;
|
||||||
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE(self);
|
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE(self);
|
||||||
|
|
@ -2529,23 +2530,25 @@ schedule_activate_all_cb(gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
schedule_activate_all(NMPolicy *self)
|
nm_policy_device_recheck_auto_activate_all_schedule(NMPolicy *self)
|
||||||
{
|
{
|
||||||
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE(self);
|
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE(self);
|
||||||
|
|
||||||
/* always restart the idle handler. That way, we settle
|
/* always restart the idle handler. That way, we settle
|
||||||
* all other events before restarting to activate them. */
|
* all other events before restarting to activate them. */
|
||||||
nm_clear_g_source(&priv->schedule_activate_all_id);
|
nm_clear_g_source(&priv->schedule_activate_all_id);
|
||||||
priv->schedule_activate_all_id = g_idle_add(schedule_activate_all_cb, self);
|
priv->schedule_activate_all_id = g_idle_add(_device_recheck_auto_activate_all_cb, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
connection_added(NMSettings *settings, NMSettingsConnection *connection, gpointer user_data)
|
connection_added(NMSettings *settings, NMSettingsConnection *connection, gpointer user_data)
|
||||||
{
|
{
|
||||||
NMPolicyPrivate *priv = user_data;
|
NMPolicyPrivate *priv = user_data;
|
||||||
NMPolicy *self = _PRIV_TO_SELF(priv);
|
NMPolicy *self = _PRIV_TO_SELF(priv);
|
||||||
|
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -2613,7 +2616,7 @@ connection_updated(NMSettings *settings,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -2662,7 +2665,7 @@ connection_flags_changed(NMSettings *settings, NMSettingsConnection *connection,
|
||||||
if (NM_FLAGS_HAS(nm_settings_connection_get_flags(connection),
|
if (NM_FLAGS_HAS(nm_settings_connection_get_flags(connection),
|
||||||
NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE)) {
|
NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE)) {
|
||||||
if (!nm_settings_connection_autoconnect_is_blocked(connection))
|
if (!nm_settings_connection_autoconnect_is_blocked(connection))
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2676,7 +2679,7 @@ secret_agent_registered(NMSettings *settings, NMSecretAgent *agent, gpointer use
|
||||||
* connections failed due to missing secrets may re-try auto-connection.
|
* connections failed due to missing secrets may re-try auto-connection.
|
||||||
*/
|
*/
|
||||||
if (reset_autoconnect_all(self, NULL, TRUE))
|
if (reset_autoconnect_all(self, NULL, TRUE))
|
||||||
schedule_activate_all(self);
|
nm_policy_device_recheck_auto_activate_all_schedule(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
NMActiveConnection *
|
NMActiveConnection *
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue