Minor best devices fix
- From: Tom Parker <palfrey tevp net>
- To: networkmanager-list gnome org
- Subject: Minor best devices fix
- Date: Sun, 21 Nov 2004 22:41:30 +0100
If you've got a device that can't even get priority of 1 (i.e. isn't
doing *any* of the good things), but we haven't got a best device yet,
then we should still consider it as a possibility. Attached patch fixes
this.
Tom
? .NetworkManagerPolicy.c.swp
? crap_devices.patch
Index: NetworkManagerPolicy.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerPolicy.c,v
retrieving revision 1.28
diff -u -r1.28 NetworkManagerPolicy.c
--- NetworkManagerPolicy.c 17 Nov 2004 17:51:36 -0000 1.28
+++ NetworkManagerPolicy.c 21 Nov 2004 21:35:58 -0000
@@ -82,7 +82,7 @@
&& link_active)
prio += 1;
- if (prio > best_wired_prio)
+ if (best_wired_dev == NULL || prio > best_wired_prio)
{
best_wired_dev = dev;
best_wired_prio = prio;
@@ -118,7 +118,7 @@
&& link_active)
prio += 3;
- if (prio > best_wireless_prio)
+ if (best_wireless_dev == NULL || prio > best_wireless_prio)
{
best_wireless_dev = dev;
best_wireless_prio = prio;
@@ -219,7 +219,6 @@
if (best_dev && (nm_device_get_driver_support_level (best_dev) == NM_DRIVER_UNSUPPORTED))
{
syslog (LOG_ERR, "nm_policy_get_best_device(): tried to switch to unsupported device '%s'!\n", nm_device_get_iface (best_dev));
- best_dev == NULL;
}
return (best_dev);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]