policy: don't clear autoconnect-blocked-reason user-request on internal reasons

reset_autoconnect_all() as two callers with only_no_secrets=FALSE:

  - sleeping_changed() when NM returns from sleep.

  - when device changes to state DISCONNECTED with reason
    CARRIER.

In both cases, this should not overwrite a previous decision by
the user that the connection should not autoconnect.

(cherry picked from commit d8b4403f6b)
This commit is contained in:
Thomas Haller 2017-11-24 12:54:31 +01:00
parent 76560639ba
commit d4530effb8

View file

@ -1440,7 +1440,8 @@ reset_autoconnect_all (NMPolicy *self,
nm_settings_connection_autoconnect_retries_reset (connection); nm_settings_connection_autoconnect_retries_reset (connection);
if (nm_settings_connection_autoconnect_blocked_reason_set (connection, if (nm_settings_connection_autoconnect_blocked_reason_set (connection,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL
& ~NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
FALSE)) FALSE))
changed = TRUE; changed = TRUE;
} }