diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-03-04 10:15:32 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-03-04 11:43:03 +0100 |
commit | bb7da812feebc28229e2bf4d3772c35d28b605f7 (patch) | |
tree | 68b6fb8d1d8901160be8935703ec658f0259602b | |
parent | 7e091a230a4dc4813d4d9cd6facd0524dff7de7b (diff) | |
download | NetworkManager-bb7da812feebc28229e2bf4d3772c35d28b605f7.tar.gz |
device/ethernet: fix crash on 802.1x authentication timeout
Fixes the following:
GLib-GObject-WARNING **: invalid cast from 'NMSimpleConnection' to 'NMSettingsConnection'
Fixes: 06da3532428e3498c1e808ff8be1af48b540a6ff
-rw-r--r-- | src/devices/nm-device-ethernet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 37b48b3a11..dbcd623328 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -721,7 +721,7 @@ supplicant_connection_timeout_cb (gpointer user_data) NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); NMDevice *device = NM_DEVICE (self); NMActRequest *req; - NMConnection *connection; + NMSettingsConnection *connection; guint64 timestamp = 0; gboolean new_secrets = TRUE; @@ -737,14 +737,14 @@ supplicant_connection_timeout_cb (gpointer user_data) req = nm_device_get_act_request (device); g_assert (req); - connection = nm_act_request_get_applied_connection (req); + connection = nm_act_request_get_settings_connection (req); g_assert (connection); /* Ask for new secrets only if we've never activated this connection * before. If we've connected before, don't bother the user with dialogs, * just retry or fail, and if we never connect the user can fix the * password somewhere else. */ - if (nm_settings_connection_get_timestamp (NM_SETTINGS_CONNECTION (connection), ×tamp)) + if (nm_settings_connection_get_timestamp (connection, ×tamp)) new_secrets = !timestamp; if (handle_auth_or_fail (self, req, new_secrets) == NM_ACT_STAGE_RETURN_POSTPONE) |