device: remove 'force_restart' argument from reactivate functions

It is now unused.

https://bugzilla.gnome.org/show_bug.cgi?id=790061
This commit is contained in:
Beniamino Galvani 2017-11-15 21:47:13 +01:00
parent f4cbed3d4f
commit 898b978e36
3 changed files with 21 additions and 31 deletions

View file

@ -134,7 +134,7 @@ parent_hwaddr_maybe_changed (NMDevice *parent,
*/
s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6)
nm_device_reactivate_ip6_config (NM_DEVICE (self), s_ip6, s_ip6, FALSE);
nm_device_reactivate_ip6_config (NM_DEVICE (self), s_ip6, s_ip6);
}
}

View file

@ -9096,8 +9096,7 @@ _nm_device_hash_check_invalid_keys (GHashTable *hash, const char *setting_name,
void
nm_device_reactivate_ip4_config (NMDevice *self,
NMSettingIPConfig *s_ip4_old,
NMSettingIPConfig *s_ip4_new,
gboolean force_restart)
NMSettingIPConfig *s_ip4_new)
{
NMDevicePrivate *priv;
const char *method_old, *method_new;
@ -9114,17 +9113,14 @@ nm_device_reactivate_ip4_config (NMDevice *self,
nm_device_get_route_table (self, AF_INET, TRUE),
nm_device_get_route_metric (self, AF_INET));
if (!force_restart) {
method_old = s_ip4_old
? nm_setting_ip_config_get_method (s_ip4_old)
: NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
method_new = s_ip4_new
? nm_setting_ip_config_get_method (s_ip4_new)
: NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
force_restart = !nm_streq0 (method_old, method_new);
}
method_old = s_ip4_old
? nm_setting_ip_config_get_method (s_ip4_old)
: NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
method_new = s_ip4_new
? nm_setting_ip_config_get_method (s_ip4_new)
: NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
if (force_restart) {
if (!nm_streq0 (method_old, method_new)) {
_cleanup_ip4_pre (self, CLEANUP_TYPE_DECONFIGURE);
_set_ip_state (self, AF_INET, IP_WAIT);
if (!nm_device_activate_stage3_ip4_start (self))
@ -9139,8 +9135,7 @@ nm_device_reactivate_ip4_config (NMDevice *self,
void
nm_device_reactivate_ip6_config (NMDevice *self,
NMSettingIPConfig *s_ip6_old,
NMSettingIPConfig *s_ip6_new,
gboolean force_restart)
NMSettingIPConfig *s_ip6_new)
{
NMDevicePrivate *priv;
const char *method_old, *method_new;
@ -9157,17 +9152,14 @@ nm_device_reactivate_ip6_config (NMDevice *self,
nm_device_get_route_table (self, AF_INET6, TRUE),
nm_device_get_route_metric (self, AF_INET6));
if (!force_restart) {
method_old = s_ip6_old
? nm_setting_ip_config_get_method (s_ip6_old)
: NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
method_new = s_ip6_new
? nm_setting_ip_config_get_method (s_ip6_new)
: NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
force_restart = !nm_streq0 (method_old, method_new);
}
method_old = s_ip6_old
? nm_setting_ip_config_get_method (s_ip6_old)
: NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
method_new = s_ip6_new
? nm_setting_ip_config_get_method (s_ip6_new)
: NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
if (force_restart) {
if (!nm_streq0 (method_old, method_new)) {
_cleanup_ip6_pre (self, CLEANUP_TYPE_DECONFIGURE);
_set_ip_state (self, AF_INET6, IP_WAIT);
if (!nm_device_activate_stage3_ip6_start (self))
@ -9416,8 +9408,8 @@ check_and_reapply_connection (NMDevice *self,
s_ip6_old = nm_connection_get_setting_ip6_config (con_old);
s_ip6_new = nm_connection_get_setting_ip6_config (con_new);
nm_device_reactivate_ip4_config (self, s_ip4_old, s_ip4_new, FALSE);
nm_device_reactivate_ip6_config (self, s_ip6_old, s_ip6_new, FALSE);
nm_device_reactivate_ip4_config (self, s_ip4_old, s_ip4_new);
nm_device_reactivate_ip6_config (self, s_ip6_old, s_ip6_new);
reactivate_proxy_config (self);

View file

@ -752,12 +752,10 @@ void nm_device_update_firewall_zone (NMDevice *self);
void nm_device_update_metered (NMDevice *self);
void nm_device_reactivate_ip4_config (NMDevice *device,
NMSettingIPConfig *s_ip4_old,
NMSettingIPConfig *s_ip4_new,
gboolean force_restart);
NMSettingIPConfig *s_ip4_new);
void nm_device_reactivate_ip6_config (NMDevice *device,
NMSettingIPConfig *s_ip6_old,
NMSettingIPConfig *s_ip6_new,
gboolean force_restart);
NMSettingIPConfig *s_ip6_new);
gboolean nm_device_update_hw_address (NMDevice *self);
void nm_device_update_initial_hw_address (NMDevice *self);