diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 0b0b0a1bb8..b3e1064fc4 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -392,7 +392,7 @@ device_state_changed (NMDevice *device, */ if (connection) { nm_settings_connection_set_autoconnect_blocked_reason (connection, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED); + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED); } break; default: diff --git a/src/nm-policy.c b/src/nm-policy.c index 3c569d5974..81fce466ba 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1193,7 +1193,7 @@ pending_ac_state_changed (NMActiveConnection *ac, guint state, guint reason, NMP * loop. */ con = nm_active_connection_get_settings_connection (ac); - nm_settings_connection_set_autoconnect_blocked_reason (con, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED); + nm_settings_connection_set_autoconnect_blocked_reason (con, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED); schedule_activate_check (self, nm_active_connection_get_device (ac)); /* Cleanup */ @@ -1267,7 +1267,7 @@ auto_activate_device (NMPolicy *self, error->message); g_error_free (error); nm_settings_connection_set_autoconnect_blocked_reason (best_connection, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED); + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED); schedule_activate_check (self, device); return; } @@ -1473,7 +1473,7 @@ block_autoconnect_for_device (NMPolicy *self, NMDevice *device) if (nm_device_check_connection_compatible (device, NM_CONNECTION (connection))) { nm_settings_connection_set_autoconnect_blocked_reason (connection, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED); + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST); } } } @@ -1806,7 +1806,7 @@ device_state_changed (NMDevice *device, _LOGD (LOGD_DEVICE, "blocking autoconnect of connection '%s' by user request", nm_settings_connection_get_id (connection)); nm_settings_connection_set_autoconnect_blocked_reason (connection, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED); + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST); } } } diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 3f9a2d523f..15d51baafc 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -2621,7 +2621,8 @@ nm_settings_connection_set_autoconnect_blocked_reason (NMSettingsConnection *sel { g_return_if_fail (NM_IN_SET (reason, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_UNBLOCKED, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS)); NM_SETTINGS_CONNECTION_GET_PRIVATE (self)->autoconnect_blocked_reason = reason; } diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h index c50b4515a3..6dcc4f40c0 100644 --- a/src/settings/nm-settings-connection.h +++ b/src/settings/nm-settings-connection.h @@ -84,8 +84,9 @@ typedef enum { /*< skip >*/ typedef enum { NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_UNBLOCKED = 0, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_BLOCKED = 1, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS = 2, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST = 1, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED = 2, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS = 3, } NMSettingsAutoconnectBlockedReason; struct _NMSettingsConnectionCallId;