about summary refs log tree commit diff
path: root/src/ppp-manager/nm-ppp-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ppp-manager/nm-ppp-manager.c')
-rw-r--r--src/ppp-manager/nm-ppp-manager.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 3546f8d7..59698c34 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -16,7 +16,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  * Copyright (C) 2008 Novell, Inc.
- * Copyright (C) 2008 - 2010 Red Hat, Inc.
+ * Copyright (C) 2008 - 2011 Red Hat, Inc.
  */
 
 #include <config.h>
@@ -374,7 +374,7 @@ extract_details_from_connection (NMConnection *connection,
 	g_return_val_if_fail (username != NULL, FALSE);
 	g_return_val_if_fail (password != NULL, FALSE);
 
-	s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+	s_con = nm_connection_get_setting_connection (connection);
 	g_assert (s_con);
 
 	connection_type = nm_setting_connection_get_connection_type (s_con);
@@ -579,7 +579,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
 	g_object_set_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES, NULL);
 
 	/* Merge in custom MTU */
-	s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
+	s_ppp = nm_connection_get_setting_ppp (connection);
 	if (s_ppp) {
 		guint32 mtu = nm_setting_ppp_get_mtu (s_ppp);
 
@@ -935,12 +935,6 @@ pppoe_fill_defaults (NMSettingPPP *setting)
 	if (!nm_setting_ppp_get_mru (setting))
 		g_object_set (setting, NM_SETTING_PPP_MRU, (guint32) 1492, NULL);
 
-	if (!nm_setting_ppp_get_lcp_echo_interval (setting))
-		g_object_set (setting, NM_SETTING_PPP_LCP_ECHO_INTERVAL, (guint32) 20, NULL);
-
-	if (!nm_setting_ppp_get_lcp_echo_failure (setting))
-		g_object_set (setting, NM_SETTING_PPP_LCP_ECHO_FAILURE, (guint32) 3, NULL);
-
 	g_object_set (setting,
 			    NM_SETTING_PPP_NOAUTH, TRUE,
 			    NM_SETTING_PPP_NODEFLATE, TRUE,
@@ -999,7 +993,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
 	connection = nm_act_request_get_connection (req);
 	g_assert (connection);
 
-	s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
+	s_ppp = nm_connection_get_setting_ppp (connection);
 	if (!s_ppp) {
 		/* If the PPP settings are all default we may not have a PPP setting yet,
 		 * so just make a default one here.
@@ -1008,7 +1002,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
 		s_ppp_created = TRUE;
 	}
 	
-	pppoe_setting = (NMSettingPPPOE *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE);
+	pppoe_setting = nm_connection_get_setting_pppoe (connection);
 	if (pppoe_setting)
 		pppoe_fill_defaults (s_ppp);