diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
| commit | e126f3e804c35480c4f075777430419d6ece23da (patch) | |
| tree | 5d5821ebcda8cd6ac34d2483bb3354910e508930 /src/devices/adsl | |
| parent | c240974325c552cad177c457d6ff04e381fd77a3 (diff) | |
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'src/devices/adsl')
| -rw-r--r-- | src/devices/adsl/meson.build | 6 | ||||
| -rw-r--r-- | src/devices/adsl/nm-device-adsl.c | 32 |
2 files changed, 19 insertions, 19 deletions
diff --git a/src/devices/adsl/meson.build b/src/devices/adsl/meson.build index 7ac0e123..ee804d23 100644 --- a/src/devices/adsl/meson.build +++ b/src/devices/adsl/meson.build @@ -20,10 +20,10 @@ libnm_device_plugin_adsl = shared_module( core_plugins += libnm_device_plugin_adsl -test( +run_target( 'check-local-devices-adsl', - check_exports, - args: [libnm_device_plugin_adsl.full_path(), linker_script_devices], + command: [check_exports, libnm_device_plugin_adsl.full_path(), linker_script_devices], + depends: libnm_device_plugin_adsl ) # FIXME: check_so_symbols replacement diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index c9984f51..1450a836 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -87,23 +87,25 @@ get_generic_capabilities (NMDevice *dev) } static gboolean -check_connection_compatible (NMDevice *device, NMConnection *connection, GError **error) +check_connection_compatible (NMDevice *device, NMConnection *connection) { NMSettingAdsl *s_adsl; const char *protocol; - if (!NM_DEVICE_CLASS (nm_device_adsl_parent_class)->check_connection_compatible (device, connection, error)) + if (!NM_DEVICE_CLASS (nm_device_adsl_parent_class)->check_connection_compatible (device, connection)) + return FALSE; + + if (!nm_connection_is_type (connection, NM_SETTING_ADSL_SETTING_NAME)) return FALSE; s_adsl = nm_connection_get_setting_adsl (connection); + if (!s_adsl) + return FALSE; + /* FIXME: we don't yet support IPoATM */ protocol = nm_setting_adsl_get_protocol (s_adsl); - if (nm_streq0 (protocol, NM_SETTING_ADSL_PROTOCOL_IPOATM)) { - /* FIXME: we don't yet support IPoATM */ - nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY, - "IPoATM protocol is not yet supported"); + if (g_strcmp0 (protocol, NM_SETTING_ADSL_PROTOCOL_IPOATM) == 0) return FALSE; - } return TRUE; } @@ -667,7 +669,7 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (klass); - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); + NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass); object_class->constructed = constructed; object_class->dispose = dispose; @@ -676,16 +678,14 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_adsl); - device_class->connection_type_check_compatible = NM_SETTING_ADSL_SETTING_NAME; - - device_class->get_generic_capabilities = get_generic_capabilities; + parent_class->get_generic_capabilities = get_generic_capabilities; - device_class->check_connection_compatible = check_connection_compatible; - device_class->complete_connection = complete_connection; + parent_class->check_connection_compatible = check_connection_compatible; + parent_class->complete_connection = complete_connection; - device_class->act_stage2_config = act_stage2_config; - device_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; - device_class->deactivate = deactivate; + parent_class->act_stage2_config = act_stage2_config; + parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; + parent_class->deactivate = deactivate; obj_properties[PROP_ATM_INDEX] = g_param_spec_int (NM_DEVICE_ADSL_ATM_INDEX, "", "", |