Weird network device deactivation (and a patch)
- From: Tomislav Vujec <tvujec redhat com>
- To: networkmanager-list gnome org
- Subject: Weird network device deactivation (and a patch)
- Date: Tue, 06 Sep 2005 03:39:55 +0200
Hi all,
I spent some time burning CDs in the last couple of hours, and I've
noticed that my network is occasionally going down. I had to restart nm
to get it back up. After it happened for the nth time, I decided to
finally turn on debug log. And it happened again. The log messages were:
[edited for readability]
Device removed (hal udi is'/org/freedesktop/Hal/devices/vol').
Deactivating device eth1.
New device added (hal udi is '/org/freedesktop/Hal/devices/vol').
Device removed (hal udi is '/org/freedesktop/Hal/devices/vol').
Deactivating device eth0.
So it seems that nm removes one network device whenever hal says that
there is a device removed from system. I modified the function
'nm_get_device_by_udi' to return NULL in case the device wasn't found in
the list. This seems fairly reasonable to me, and if you agree, please
apply the patch.
Regards,
--
Tomislav Vujec Manager, Client Development
Red Hat GmbH Otto-Hahn-Straße 20 Germany 85609 München-Dornach
Tel +49 89 205071 212 Fax +49 89 205071 111 Cell. +49 172 623 1214
Skype/AIM/Yahoo/IRC: tvujec ICQ: 4508361 http://www.redhat.com/
Index: ./src/NetworkManagerDevice.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDevice.c,v
retrieving revision 1.157
diff -u -r1.157 NetworkManagerDevice.c
--- ./src/NetworkManagerDevice.c 4 Sep 2005 17:02:41 -0000 1.157
+++ ./src/NetworkManagerDevice.c 6 Sep 2005 01:24:58 -0000
@@ -166,11 +166,11 @@
if ((dev = (NMDevice *)(elt->data)))
{
if (nm_null_safe_strcmp (nm_device_get_udi (dev), udi) == 0)
- break;
+ return (dev);
}
}
- return (dev);
+ return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]