2004-10-21 Dan Williams <dcbw@redhat.com>

* NetworkManager.h
		- New file, now contains commonly used structures and bits
			for the dbus API of NetworkManager

	* Makefile.am
		- Deliver NetworkManager.h to ${includedir}/NetworkManager

	* src/NetworkManager.h
		- Rename -> src/NetworkManagerMain.c

	* Various fixups all around to use NetworkManager.h and new
		src/NetworkManagerMain.h, remove redundant bits that got
		moved into NetworkManager.h

	* src/NetworkManagerDevice.[ch]
	  src/NetworkManagerUtils.[ch]
	  src/NetworkManagerPolicy.c
	  src/NetworkManagerDbus.c
		- Whitelist wireless drivers, and blacklist some wired
			drivers.  Also blacklist cipsec and ethernet-over-usb
			devices at this time (RH #135722, RH #135648)
		- Don't leak unsupported devices out over dbus, or allow
			them to be set as the active device.  Skip over them
			during automatic device picking

	* test/nmclienttest.c
		- Clean up the dbus code a lot


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-10-21 17:42:14 +00:00
parent d8540834b3
commit faae8945db
28 changed files with 774 additions and 670 deletions

View File

@@ -35,7 +35,7 @@
#include "NetworkManagerAPList.h"
#include "NetworkManagerDbus.h"
gboolean allowed_ap_worker_exit = FALSE;
gboolean allowed_ap_worker_exit = FALSE;
/*
@@ -66,6 +66,13 @@ static NMDevice * nm_policy_auto_get_best_device (NMData *data)
dev = (NMDevice *)(element->data);
/* Skip unsupported devices */
if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
{
element = g_slist_next (element);
continue;
}
dev_type = nm_device_get_type (dev);
link_active = nm_device_get_link_active (dev);
@@ -211,6 +218,13 @@ static NMDevice * nm_policy_get_best_device (NMData *data, gboolean *should_lock
best_dev = nm_policy_auto_get_best_device (data);
}
/* Ensure we support this driver */
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);
}