diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2018-10-18 20:05:19 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-23 11:32:28 +0200 |
commit | 21fc18cc33b6a8b9ce620c07797548e01876c290 (patch) | |
tree | c6e359ef7c9c9ded94303ee1647d1a37d258d13d | |
parent | 9dc1611f3750d7252d29c140bce86f8572b2c728 (diff) | |
download | NetworkManager-21fc18cc33b6a8b9ce620c07797548e01876c290.tar.gz |
wifi/iwd: skip creating a GVariant for DBus calls with no params
g_dbus_proxy_call and other GDBus function can accept a NULL as the
method call parameters.
-rw-r--r-- | src/devices/wifi/nm-device-iwd.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c index 371fecd046..1bb893b5bd 100644 --- a/src/devices/wifi/nm-device-iwd.c +++ b/src/devices/wifi/nm-device-iwd.c @@ -406,7 +406,7 @@ update_aps (NMDeviceIwd *self) priv->cancellable = g_cancellable_new (); g_dbus_proxy_call (priv->dbus_station_proxy, "GetOrderedNetworks", - g_variant_new ("()"), G_DBUS_CALL_FLAGS_NONE, + NULL, G_DBUS_CALL_FLAGS_NONE, 2000, priv->cancellable, get_ordered_networks_cb, self); } @@ -416,8 +416,8 @@ send_disconnect (NMDeviceIwd *self) { NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE (self); - g_dbus_proxy_call (priv->dbus_station_proxy, "Disconnect", g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL); + g_dbus_proxy_call (priv->dbus_station_proxy, "Disconnect", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL); } static void @@ -534,7 +534,7 @@ deactivate_async (NMDevice *device, if (priv->dbus_station_proxy) { g_dbus_proxy_call (priv->dbus_station_proxy, "Disconnect", - g_variant_new ("()"), + NULL, G_DBUS_CALL_FLAGS_NONE, -1, cancellable, @@ -1097,8 +1097,7 @@ dbus_request_scan_cb (NMDevice *device, if (!priv->scanning && !priv->scan_requested) { g_dbus_proxy_call (priv->dbus_station_proxy, "Scan", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, -1, + NULL, G_DBUS_CALL_FLAGS_NONE, -1, priv->cancellable, scan_cb, self); priv->scan_requested = TRUE; } @@ -1798,8 +1797,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) * timeouts. */ g_dbus_proxy_call (network_proxy, "Connect", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, G_MAXINT, + NULL, G_DBUS_CALL_FLAGS_NONE, G_MAXINT, priv->cancellable, network_connect_cb, self); g_object_unref (network_proxy); @@ -1855,8 +1853,8 @@ periodic_scan_timeout_cb (gpointer user_data) if (priv->scanning || priv->scan_requested) return FALSE; - g_dbus_proxy_call (priv->dbus_station_proxy, "Scan", g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, -1, + g_dbus_proxy_call (priv->dbus_station_proxy, "Scan", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, priv->cancellable, scan_cb, self); priv->scan_requested = TRUE; |