diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 11:24:41 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 11:24:41 +0100 |
| commit | bbae86d3d2997a853ca0365e8eb7a3ca7489ee09 (patch) | |
| tree | 1f7fa49b47ab13aea3effbe839559d221f6323b4 /src/devices/adsl | |
| parent | 404ebe62622150e77e311777dff8617eb974e834 (diff) | |
New upstream version 1.15.2
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 | 15 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/devices/adsl/meson.build b/src/devices/adsl/meson.build index 7ac0e123..f92e809c 100644 --- a/src/devices/adsl/meson.build +++ b/src/devices/adsl/meson.build @@ -1,11 +1,11 @@ sources = files( 'nm-atm-manager.c', - 'nm-device-adsl.c' + 'nm-device-adsl.c', ) deps = [ libudev_dep, - nm_dep + nm_dep, ] libnm_device_plugin_adsl = shared_module( @@ -15,7 +15,7 @@ libnm_device_plugin_adsl = shared_module( link_args: ldflags_linker_script_devices, link_depends: linker_script_devices, install: true, - install_dir: nm_plugindir + install_dir: nm_plugindir, ) core_plugins += libnm_device_plugin_adsl diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index c9984f51..ddc03ce3 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -259,8 +259,9 @@ pppoe_vcc_config (NMDeviceAdsl *self) NMDevice *device = NM_DEVICE (self); NMSettingAdsl *s_adsl; - s_adsl = nm_connection_get_setting_adsl (nm_device_get_applied_connection (device)); - g_assert (s_adsl); + s_adsl = nm_device_get_applied_setting (device, NM_TYPE_SETTING_ADSL); + + g_return_val_if_fail (s_adsl, FALSE); /* Set up the VCC */ if (!br2684_assign_vcc (self, s_adsl)) @@ -389,7 +390,8 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) NMSettingAdsl *s_adsl; const char *protocol; - s_adsl = nm_connection_get_setting_adsl (nm_device_get_applied_connection (device)); + s_adsl = nm_device_get_applied_setting (device, NM_TYPE_SETTING_ADSL); + g_return_val_if_fail (s_adsl, NM_ACT_STAGE_RETURN_FAILURE); protocol = nm_setting_adsl_get_protocol (s_adsl); @@ -465,8 +467,11 @@ act_stage3_ip4_config_start (NMDevice *device, const char *ppp_iface; req = nm_device_get_act_request (device); + g_return_val_if_fail (req, NM_ACT_STAGE_RETURN_FAILURE); - s_adsl = (NMSettingAdsl *) nm_device_get_applied_setting (device, NM_TYPE_SETTING_ADSL); + + s_adsl = nm_device_get_applied_setting (device, NM_TYPE_SETTING_ADSL); + g_return_val_if_fail (s_adsl, NM_ACT_STAGE_RETURN_FAILURE); /* PPPoE uses the NAS interface, not the ATM interface */ @@ -523,7 +528,7 @@ adsl_cleanup (NMDeviceAdsl *self) if (priv->ppp_manager) { g_signal_handlers_disconnect_by_func (priv->ppp_manager, G_CALLBACK (ppp_state_changed), self); g_signal_handlers_disconnect_by_func (priv->ppp_manager, G_CALLBACK (ppp_ip4_config), self); - nm_ppp_manager_stop (priv->ppp_manager, NULL, NULL); + nm_ppp_manager_stop (priv->ppp_manager, NULL, NULL, NULL); g_clear_object (&priv->ppp_manager); } |