libnm-glib: add errors to device classes and nm_device_connection_compatible()

Add nm_device_connection_compatible() that returns an error when it fails.
nm_device_connection_valid() does the same work except it doesn't set GError.
This commit is contained in:
Jiří Klimeš
2012-03-14 14:10:03 +01:00
parent 43ba4eb04b
commit a11067f584
22 changed files with 581 additions and 80 deletions

View File

@@ -1233,11 +1233,11 @@ find_device_for_connection (NmCli *nmc,
if (iface) {
const char *dev_iface = nm_device_get_iface (dev);
if ( !strcmp (dev_iface, iface)
&& nm_device_connection_valid (dev, connection)) {
&& nm_device_connection_compatible (dev, connection, NULL)) {
found_device = dev;
}
} else {
if (nm_device_connection_valid (dev, connection)) {
if (nm_device_connection_compatible (dev, connection, NULL)) {
found_device = dev;
}
}