about summary refs log tree commit diff
path: root/src/devices/nm-device-ppp.c
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-05-19 16:38:51 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-05-19 16:38:51 +0200
commit96642ebde58e1eea692aea6a92d33f45452fa9c0 (patch)
tree106ddfa2180b3997e8965787b5cb122982ebab9d /src/devices/nm-device-ppp.c
parent8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (diff)
parentd460892bbfece74fb6d3cd846bf6ef548290be41 (diff)
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latestt pu
Diffstat (limited to 'src/devices/nm-device-ppp.c')
-rw-r--r--src/devices/nm-device-ppp.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/devices/nm-device-ppp.c b/src/devices/nm-device-ppp.c
index 32403ff6..52784143 100644
--- a/src/devices/nm-device-ppp.c
+++ b/src/devices/nm-device-ppp.c
@@ -39,7 +39,7 @@ struct _NMDevicePppClass {
 
 G_DEFINE_TYPE (NMDevicePpp, nm_device_ppp, NM_TYPE_DEVICE)
 
-#define NM_DEVICE_PPP_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevicePpp, NM_IS_DEVICE_PPP)
+#define NM_DEVICE_PPP_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevicePpp, NM_IS_DEVICE_PPP, NMDevice)
 
 static NMDeviceCapabilities
 get_generic_capabilities (NMDevice *device)
@@ -137,11 +137,9 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason)
 	GError *error = NULL;
 
 	req = nm_device_get_act_request (device);
-
 	g_return_val_if_fail (req, NM_ACT_STAGE_RETURN_FAILURE);
 
 	s_pppoe = nm_device_get_applied_setting (device, NM_TYPE_SETTING_PPPOE);
-
 	g_return_val_if_fail (s_pppoe, NM_ACT_STAGE_RETURN_FAILURE);
 
 	g_clear_object (&priv->ip4_config);
@@ -157,9 +155,12 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason)
 	}
 
 	if (   !priv->ppp_manager
-	    || !nm_ppp_manager_start (priv->ppp_manager, req,
+	    || !nm_ppp_manager_start (priv->ppp_manager,
+	                              req,
 	                              nm_setting_pppoe_get_username (s_pppoe),
-	                              30, 0, &error)) {
+	                              30,
+	                              0,
+	                              &error)) {
 		_LOGW (LOGD_DEVICE | LOGD_PPP, "PPPoE failed to start: %s", error->message);
 		g_error_free (error);
 
@@ -169,16 +170,18 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason)
 		return NM_ACT_STAGE_RETURN_FAILURE;
 	}
 
-	g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_STATE_CHANGED,
+	g_signal_connect (priv->ppp_manager,
+	                  NM_PPP_MANAGER_SIGNAL_STATE_CHANGED,
 	                  G_CALLBACK (ppp_state_changed),
 	                  self);
-	g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IFINDEX_SET,
+	g_signal_connect (priv->ppp_manager,
+	                  NM_PPP_MANAGER_SIGNAL_IFINDEX_SET,
 	                  G_CALLBACK (ppp_ifindex_set),
 	                  self);
-	g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IP4_CONFIG,
+	g_signal_connect (priv->ppp_manager,
+	                  NM_PPP_MANAGER_SIGNAL_IP4_CONFIG,
 	                  G_CALLBACK (ppp_ip4_config),
 	                  self);
-
 	return NM_ACT_STAGE_RETURN_POSTPONE;
 }