core: announce device removal even for udev events with no ifindex property

Actually, this case should no longer happen, but just to be sure:
when a udev remove event without ifindex comes, get the ifindex from
the cache and announce the device removal.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2013-10-15 20:09:50 +02:00
parent d59311b095
commit bc092bcf44

View File

@@ -2534,6 +2534,7 @@ udev_device_removed (NMPlatform *platform,
g_hash_table_iter_init (&iter, priv->udev_devices);
while (g_hash_table_iter_next (&iter, &key, &value)) {
if ((GUdevDevice *)value == udev_device) {
ifindex = GPOINTER_TO_INT (key);
g_hash_table_iter_remove (&iter);
break;
}