diff options
author | Thomas Haller <thaller@redhat.com> | 2017-10-24 09:18:16 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-10-31 19:35:33 +0100 |
commit | 18f2d272ba9e76ff93aac9983dd0590923aaf7d0 (patch) | |
tree | 4b9877224c5cd855a7be5698b40f1f176a47a09a /src/devices/nm-device-ethernet.c | |
parent | 361a199a0639dd8a82c61912df301028efca5f33 (diff) | |
download | NetworkManager-18f2d272ba9e76ff93aac9983dd0590923aaf7d0.tar.gz |
settings: add and use nm_settings_connection_autoconnect_retries_try_next()
Diffstat (limited to 'src/devices/nm-device-ethernet.c')
-rw-r--r-- | src/devices/nm-device-ethernet.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 8b9ae1d8ba..bb71cf6222 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -667,16 +667,12 @@ handle_auth_or_fail (NMDeviceEthernet *self, const char *setting_name; NMConnection *applied_connection; NMSettingsConnection *settings_connection; - int tries_left; applied_connection = nm_act_request_get_applied_connection (req); settings_connection = nm_act_request_get_settings_connection (req); - tries_left = nm_settings_connection_autoconnect_retries_get (settings_connection); - if (tries_left == 0) + if (!nm_settings_connection_autoconnect_retries_try_next (settings_connection)) return NM_ACT_STAGE_RETURN_FAILURE; - if (tries_left > 0) - nm_settings_connection_autoconnect_retries_set (settings_connection, tries_left - 1); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); |