libnm: fix accessing enabled and metered properties

This commit is contained in:
Thomas Haller 2017-11-02 16:23:09 +01:00
parent 44c7179885
commit f484465e78
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,57 @@
From a3900f1ab74a7ff17f87ed3485af2cd327fee091 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 1 Nov 2017 21:29:39 +0100
Subject: [PATCH 1/1] libnm/client: proxy *_enabled and metered properties to
the right object
They're provided by the Manager, not by the RemoteSettings.
(cherry picked from commit c81005b84650b8e6d709ce6afda96fb55987cdb8)
(cherry picked from commit 34035ceee8e75d8cb7deb6f4aa211067bddcfe97)
---
libnm/nm-client.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index c8707f50e..4d7931756 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -2630,7 +2630,7 @@ get_property (GObject *object, guint prop_id,
break;
case PROP_WIRELESS_HARDWARE_ENABLED:
if (priv->manager)
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
else
g_value_set_boolean (value, FALSE);
break;
@@ -2639,7 +2639,7 @@ get_property (GObject *object, guint prop_id,
break;
case PROP_WWAN_HARDWARE_ENABLED:
if (priv->manager)
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
else
g_value_set_boolean (value, FALSE);
break;
@@ -2648,7 +2648,7 @@ get_property (GObject *object, guint prop_id,
break;
case PROP_WIMAX_HARDWARE_ENABLED:
if (priv->manager)
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
else
g_value_set_boolean (value, FALSE);
break;
@@ -2669,7 +2669,7 @@ get_property (GObject *object, guint prop_id,
break;
case PROP_METERED:
if (priv->manager)
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
else
g_value_set_uint (value, NM_METERED_UNKNOWN);
break;
--
2.13.6

View File

@ -688,6 +688,7 @@ fi
* Mon Nov 2 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.4-6
- systemd: let NM-w-o.service require NetworkManager service (rh #1452866)
- platform: really treat dsa devices as regular wired ethernet (rh #1371289)
- libnm: fix accessing enabled and metered properties
* Mon Oct 8 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.4-5
- platform: treat dsa devices as regular wired ethernet (rh #1371289)