manager: don't the already activated devices shouldn't be considered added

The NMSettings shouldn't generate a new default wired connection for
devices that are being deactivated.

(cherry picked from commit ec542df4df)
This commit is contained in:
Lubomir Rintel 2016-04-01 14:35:38 +02:00
parent 5476ea5c45
commit 21c98f5da9

View file

@ -731,6 +731,9 @@ manager_device_state_changed (NMDevice *device,
break;
}
if (old_state >= NM_DEVICE_STATE_ACTIVATED)
return;
if ( new_state == NM_DEVICE_STATE_UNAVAILABLE
|| new_state == NM_DEVICE_STATE_DISCONNECTED)
nm_settings_device_added (priv->settings, device);