core: always unrealize software devices when platform link disappears

We possibly need the unrealized device for connections that need
this. nm_device_unrealize() will check if there are still any
available-connections and possibly emit DEVICE_REMOVED signal.

Fixes: 7e5f27a21c
This commit is contained in:
Thomas Haller 2016-01-14 17:24:25 +01:00
parent 7830b79d50
commit 2292cb63bf

View file

@ -2088,7 +2088,7 @@ _platform_link_cb_idle (PlatformLinkCbData *data)
device = nm_manager_get_device_by_ifindex (self, data->ifindex);
if (device) {
if (nm_device_is_software (device) && nm_device_get_is_nm_owned (device)) {
if (nm_device_is_software (device)) {
/* Our software devices stick around until their connection is removed */
if (!nm_device_unrealize (device, FALSE, &error)) {
nm_log_warn (LOGD_DEVICE, "(%s): failed to unrealize: %s",