diff options
author | Thomas Haller <thaller@redhat.com> | 2016-08-31 18:51:16 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-09-09 14:10:27 +0200 |
commit | 2162a84c5fd191fe6de171412958473c0b6f4487 (patch) | |
tree | 5b3f9e2edfc593da72a2d93d6e8a0dece8a3447d | |
parent | 398e1e8b3c7e63161e7a3c8ac614bb29fd7e3e7c (diff) | |
download | NetworkManager-2162a84c5fd191fe6de171412958473c0b6f4487.tar.gz |
device/trivial: rename NM_ACT_STAGE_RETURN_STOP to NM_ACT_STAGE_RETURN_IP_FAIL
and rename NM_ACT_STAGE_RETURN_STOP to NM_ACT_STAGE_RETURN_IP_FAIL.
They are only used during IP config stage. Give them a better name.
-rw-r--r-- | src/devices/nm-device-private.h | 6 | ||||
-rw-r--r-- | src/devices/nm-device.c | 24 | ||||
-rw-r--r-- | src/devices/wwan/nm-device-modem.c | 2 | ||||
-rw-r--r-- | src/devices/wwan/nm-modem.c | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h index a91bb422f2..0274431bb9 100644 --- a/src/devices/nm-device-private.h +++ b/src/devices/nm-device-private.h @@ -27,11 +27,11 @@ /* This file should only be used by subclasses of NMDevice */ enum NMActStageReturn { - NM_ACT_STAGE_RETURN_FAILURE = 0, + NM_ACT_STAGE_RETURN_FAILURE = 0, /* Hard failure of activation */ NM_ACT_STAGE_RETURN_SUCCESS, /* Activation stage done */ NM_ACT_STAGE_RETURN_POSTPONE, /* Long-running operation in progress */ - NM_ACT_STAGE_RETURN_WAIT, /* Not ready to start stage; wait */ - NM_ACT_STAGE_RETURN_STOP, /* Activation not wanted */ + NM_ACT_STAGE_RETURN_IP_WAIT, /* IP config stage is waiting (state IP_WAIT) */ + NM_ACT_STAGE_RETURN_IP_FAIL, /* IP config stage failed (state IP_FAIL), activation may proceed */ }; #define NM_DEVICE_CAP_NONSTANDARD_CARRIER 0x80000000 diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 790a4a93c7..927d12e76c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5388,7 +5388,7 @@ act_stage3_ip4_config_start (NMDevice *self, && !priv->carrier) { _LOGI (LOGD_IP4 | LOGD_DEVICE, "IPv4 config waiting until carrier is on"); - return NM_ACT_STAGE_RETURN_WAIT; + return NM_ACT_STAGE_RETURN_IP_WAIT; } if (priv->is_master && ip4_requires_slaves (connection)) { @@ -5402,7 +5402,7 @@ act_stage3_ip4_config_start (NMDevice *self, if (ready_slaves == FALSE) { _LOGI (LOGD_DEVICE | LOGD_IP4, "IPv4 config waiting until slaves are ready"); - return NM_ACT_STAGE_RETURN_WAIT; + return NM_ACT_STAGE_RETURN_IP_WAIT; } } @@ -5436,7 +5436,7 @@ act_stage3_ip4_config_start (NMDevice *self, } else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0) { apply_mtu_from_config (self); /* Nothing else to do... */ - ret = NM_ACT_STAGE_RETURN_STOP; + ret = NM_ACT_STAGE_RETURN_IP_FAIL; } else _LOGW (LOGD_IP4, "unhandled IPv4 config method '%s'; will fail", method); @@ -6721,7 +6721,7 @@ act_stage3_ip6_config_start (NMDevice *self, && !priv->carrier) { _LOGI (LOGD_IP6 | LOGD_DEVICE, "IPv6 config waiting until carrier is on"); - return NM_ACT_STAGE_RETURN_WAIT; + return NM_ACT_STAGE_RETURN_IP_WAIT; } if (priv->is_master && ip6_requires_slaves (connection)) { @@ -6735,7 +6735,7 @@ act_stage3_ip6_config_start (NMDevice *self, if (ready_slaves == FALSE) { _LOGI (LOGD_DEVICE | LOGD_IP6, "IPv6 config waiting until slaves are ready"); - return NM_ACT_STAGE_RETURN_WAIT; + return NM_ACT_STAGE_RETURN_IP_WAIT; } } @@ -6757,7 +6757,7 @@ act_stage3_ip6_config_start (NMDevice *self, nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1"); restore_ip6_properties (self); } - return NM_ACT_STAGE_RETURN_STOP; + return NM_ACT_STAGE_RETURN_IP_FAIL; } /* Ensure the MTU makes sense. If it was below 1280 the kernel would not @@ -6782,7 +6782,7 @@ act_stage3_ip6_config_start (NMDevice *self, if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0) { if (!addrconf6_start (self, ip6_privacy)) { /* IPv6 might be disabled; allow IPv4 to proceed */ - ret = NM_ACT_STAGE_RETURN_STOP; + ret = NM_ACT_STAGE_RETURN_IP_FAIL; } else ret = NM_ACT_STAGE_RETURN_POSTPONE; } else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0) { @@ -6791,7 +6791,7 @@ act_stage3_ip6_config_start (NMDevice *self, priv->dhcp6.mode = NM_RDISC_DHCP_LEVEL_MANAGED; if (!dhcp6_start (self, TRUE, reason)) { /* IPv6 might be disabled; allow IPv4 to proceed */ - ret = NM_ACT_STAGE_RETURN_STOP; + ret = NM_ACT_STAGE_RETURN_IP_FAIL; } else ret = NM_ACT_STAGE_RETURN_POSTPONE; } else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0) { @@ -6850,10 +6850,10 @@ nm_device_activate_stage3_ip4_start (NMDevice *self) } else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); return FALSE; - } else if (ret == NM_ACT_STAGE_RETURN_STOP) { + } else if (ret == NM_ACT_STAGE_RETURN_IP_FAIL) { /* Activation not wanted */ _set_ip_state (self, AF_INET, IP_FAIL); - } else if (ret == NM_ACT_STAGE_RETURN_WAIT) { + } else if (ret == NM_ACT_STAGE_RETURN_IP_WAIT) { /* Wait for something to try IP config again */ _set_ip_state (self, AF_INET, IP_WAIT); } else @@ -6896,10 +6896,10 @@ nm_device_activate_stage3_ip6_start (NMDevice *self) } else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); return FALSE; - } else if (ret == NM_ACT_STAGE_RETURN_STOP) { + } else if (ret == NM_ACT_STAGE_RETURN_IP_FAIL) { /* Activation not wanted */ _set_ip_state (self, AF_INET6, IP_FAIL); - } else if (ret == NM_ACT_STAGE_RETURN_WAIT) { + } else if (ret == NM_ACT_STAGE_RETURN_IP_WAIT) { /* Wait for something to try IP config again */ _set_ip_state (self, AF_INET6, IP_WAIT); } else diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 0f96dafbfc..f6ca0e9224 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -230,7 +230,7 @@ modem_ip6_config_result (NMModem *modem, case NM_ACT_STAGE_RETURN_FAILURE: nm_device_ip_method_failed (device, AF_INET6, reason); break; - case NM_ACT_STAGE_RETURN_STOP: + case NM_ACT_STAGE_RETURN_IP_FAIL: /* all done */ nm_device_activate_schedule_ip6_config_result (device); break; diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 28dab2c157..bf3eac9262 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -590,7 +590,7 @@ nm_modem_stage3_ip4_config_start (NMModem *self, /* Only Disabled and Auto methods make sense for WWAN */ if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0) - return NM_ACT_STAGE_RETURN_STOP; + return NM_ACT_STAGE_RETURN_IP_FAIL; if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) != 0) { nm_log_warn (LOGD_MB | LOGD_IP4, @@ -615,7 +615,7 @@ nm_modem_stage3_ip4_config_start (NMModem *self, break; default: nm_log_info (LOGD_MB, "(%s): IPv4 configuration disabled", nm_modem_get_uid (self)); - ret = NM_ACT_STAGE_RETURN_STOP; + ret = NM_ACT_STAGE_RETURN_IP_FAIL; break; } @@ -709,7 +709,7 @@ nm_modem_stage3_ip6_config_start (NMModem *self, /* Only Ignore and Auto methods make sense for WWAN */ if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) - return NM_ACT_STAGE_RETURN_STOP; + return NM_ACT_STAGE_RETURN_IP_FAIL; if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) != 0) { nm_log_warn (LOGD_MB | LOGD_IP6, @@ -734,7 +734,7 @@ nm_modem_stage3_ip6_config_start (NMModem *self, break; default: nm_log_info (LOGD_MB, "(%s): IPv6 configuration disabled", nm_modem_get_uid (self)); - ret = NM_ACT_STAGE_RETURN_STOP; + ret = NM_ACT_STAGE_RETURN_IP_FAIL; break; } |