supplicant: avoid G_VARIANT_BUILDER_INIT() from glib 2.50
G_VARIANT_BUILDER_INIT() was only added in glib 2.50, hence we cannot use
it.
Maybe nm-glib.h should provide a compat macro, but the macro relies
on the magic number GVSB_MAGIC_PARTIAL, which is private to glib.
It's not clear that we can savely provide such a compat implementation
for older glib variants.
Fixes: 642f15f2f6
This commit is contained in:
@@ -151,7 +151,7 @@ nm_supplicant_manager_set_wfd_ies (NMSupplicantManager *self,
|
|||||||
GBytes *wfd_ies)
|
GBytes *wfd_ies)
|
||||||
{
|
{
|
||||||
NMSupplicantManagerPrivate *priv;
|
NMSupplicantManagerPrivate *priv;
|
||||||
GVariantBuilder params = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE ("(ssv)"));
|
GVariantBuilder params;
|
||||||
GVariant *val;
|
GVariant *val;
|
||||||
|
|
||||||
g_return_if_fail (NM_IS_SUPPLICANT_MANAGER (self));
|
g_return_if_fail (NM_IS_SUPPLICANT_MANAGER (self));
|
||||||
@@ -169,6 +169,8 @@ nm_supplicant_manager_set_wfd_ies (NMSupplicantManager *self,
|
|||||||
val = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
val = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
|
||||||
NULL, 0, sizeof (guint8));
|
NULL, 0, sizeof (guint8));
|
||||||
|
|
||||||
|
g_variant_builder_init (¶ms, G_VARIANT_TYPE ("(ssv)"));
|
||||||
|
|
||||||
g_variant_builder_add (¶ms, "s", g_dbus_proxy_get_interface_name (priv->proxy));
|
g_variant_builder_add (¶ms, "s", g_dbus_proxy_get_interface_name (priv->proxy));
|
||||||
g_variant_builder_add (¶ms, "s", "WFDIEs");
|
g_variant_builder_add (¶ms, "s", "WFDIEs");
|
||||||
g_variant_builder_add_value (¶ms, g_variant_new_variant (val));
|
g_variant_builder_add_value (¶ms, g_variant_new_variant (val));
|
||||||
|
Reference in New Issue
Block a user