summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-03-29 15:40:54 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-03-29 16:07:39 +0200
commitc86d66632ad76aa4a93593a07a9b4e25f18efbf7 (patch)
treee31b1a503182e45e6dab57f4829df44fc42734ff /src
parent027ca27169bb9425594b3c82d927c1ff861537e9 (diff)
Revert "applet: workaround crash in applet code"
Fixed in libnm. This reverts commit 22468c05291d3d88ddc68f8983bffe54f29f5f82.
Diffstat (limited to 'src')
-rw-r--r--src/applet.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/applet.c b/src/applet.c
index c423f49b..0fe14e75 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1083,6 +1083,7 @@ applet_get_first_active_vpn_connection (NMApplet *applet,
for (i = 0; active_list && (i < active_list->len); i++) {
NMActiveConnection *candidate;
NMConnection *connection;
+ NMSettingConnection *s_con;
candidate = g_ptr_array_index (active_list, i);
@@ -1090,12 +1091,10 @@ applet_get_first_active_vpn_connection (NMApplet *applet,
if (!connection)
continue;
- /* FIXME: rh#1313866 crashed on the following invariants for unknown reasons.
- * Downgrade crash to warning. */
- g_warn_if_fail (NM_IS_CONNECTION (connection));
- g_warn_if_fail (NM_IS_SETTING (nm_connection_get_setting_connection (connection)));
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
- if (nm_streq0 (nm_connection_get_connection_type (connection), NM_SETTING_VPN_SETTING_NAME)) {
+ if (!strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_VPN_SETTING_NAME)) {
if (out_state)
*out_state = nm_vpn_connection_get_vpn_state (NM_VPN_CONNECTION (candidate));
return candidate;