summaryrefslogtreecommitdiff
path: root/src/ppp-manager
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2011-12-05 12:27:47 +0100
committerDan Williams <dcbw@redhat.com>2011-12-06 16:06:43 -0600
commit5b7503e95eb9d84935efea708b9dc326ef14d8ce (patch)
tree733311f3db53714ba4f4087a83f2bf0816d54ee5 /src/ppp-manager
parentc1344ec0976a46bf754c72b008278f9330e00796 (diff)
downloadNetworkManager-5b7503e95eb9d84935efea708b9dc326ef14d8ce.tar.gz
core: use nm_connection_get_setting_<type>() whenever possible
Leads to shorter, easier to read code and improves type casting safety. Signed-off-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'src/ppp-manager')
-rw-r--r--src/ppp-manager/nm-ppp-manager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 3546f8d74a..9b937333a1 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -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);
@@ -999,7 +999,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 +1008,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);