summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-09-23 13:16:20 +0200
committerThomas Haller <thaller@redhat.com>2016-09-23 15:49:52 +0200
commit4a6c07d4e5b1c8c2bf3556ecb8cd11e7d0a796f9 (patch)
treef46ed120d6e8143581ba0c18213fc10b3fb456b3
parent2ca1ce5d88a659ca396547cf884dc35fb52257a2 (diff)
downloadNetworkManager-4a6c07d4e5b1c8c2bf3556ecb8cd11e7d0a796f9.tar.gz
capabilities: fix data type to "u" / uint32
The property NM_MANAGER_CAPABILITIES was already "au". The types must be used consistently.
-rw-r--r--introspection/nm-manager.xml2
-rw-r--r--src/nm-manager.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml
index 9893556e56..f3fb847831 100644
--- a/introspection/nm-manager.xml
+++ b/introspection/nm-manager.xml
@@ -387,7 +387,7 @@
linkend="NMCapability">NMCapability</link> for currently
defined capability numbers.
-->
- <property name="Capabilities" type="ai" access="read"/>
+ <property name="Capabilities" type="au" access="read"/>
<!--
State:
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 4983da51af..657051b8a5 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -5450,7 +5450,7 @@ nm_manager_check_capability (NMManager *self,
int i;
for (i = 0; i < priv->capabilities->len; i++) {
- NMCapability test = g_array_index (priv->capabilities, gint, i);
+ NMCapability test = g_array_index (priv->capabilities, guint32, i);
if (test == cap)
return TRUE;
if (test > cap)
@@ -5527,7 +5527,7 @@ constructed (GObject *object)
G_OBJECT_CLASS (nm_manager_parent_class)->constructed (object);
- priv->capabilities = g_array_new (FALSE, FALSE, sizeof (gint));
+ priv->capabilities = g_array_new (FALSE, FALSE, sizeof (guint32));
_set_prop_filter (self, nm_bus_manager_get_connection (priv->dbus_mgr));
@@ -5688,10 +5688,10 @@ get_property (GObject *object, guint prop_id,
g_value_set_string (value, VERSION);
break;
case PROP_CAPABILITIES:
- g_value_set_variant (value, g_variant_new_fixed_array (G_VARIANT_TYPE ("i"),
+ g_value_set_variant (value, g_variant_new_fixed_array (G_VARIANT_TYPE ("u"),
priv->capabilities->data,
priv->capabilities->len,
- sizeof(gint)));
+ sizeof (guint32)));
break;
case PROP_STATE:
nm_manager_update_state (self);