diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-07 12:36:17 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-08 12:35:10 +0100 |
commit | 186d9de66a653bb64903455d5b3738198c7dec7b (patch) | |
tree | 61af4f13c99f5c168695824d96635fc38220cac4 /src/devices/bluetooth | |
parent | f0731dc716f08d1187ff2c936a1fee0e8c4ab92f (diff) |
device: improve tracking autoconnect-blocked flags of NMDevice
- split NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN in two parts:
"wrong-pin" and "manual-disconnect". Setting/unsetting them
should be tracked differently, as their reason differs.
- no longer initialize/clear the autoconnect-blocked reasons
during realize/unrealize of the device. Instead, initialize
it once when the object gets created (nm_device_init()), and
keep the settings beyond unrealize/realize cycles. This only
matters for software devices, as regular devices get deleted
after unrealizing once. But for software devices it is essential,
because we don't want to forget the autoconnect settings of
the device instance.
- drop verbose logging about blocking autoconnect due to failed
pin. We already log changes to autoconnect-blocked flags with
TRACE level. An additional message about this particular issue
seems not necessary at INFO level.
- in NMManager's do_sleep_wake(), no longer block autoconnect
for devices during sleep. We already unmanage the device, which
is a far more effective measure to prevent activation. We should
not also block autoconnect.
(cherry picked from commit 3c2b9485a7d3bbc7f411e29560f92dd9178b044b)
Diffstat (limited to 'src/devices/bluetooth')
-rw-r--r-- | src/devices/bluetooth/nm-device-bt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index d400bc842..977c1e1ae 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -491,8 +491,7 @@ modem_prepare_result (NMModem *modem, * the device to be auto-activated anymore, which would risk locking * the SIM if the incorrect PIN continues to be used. */ - _LOGI (LOGD_MB, "disabling autoconnect due to failed SIM PIN"); - nm_device_autoconnect_blocked_set (device, NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN); + nm_device_autoconnect_blocked_set (device, NM_DEVICE_AUTOCONNECT_BLOCKED_WRONG_PIN); } nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); |