From c2de0d98ba39e0a1a970d066fd19be786092f376 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 1 Mar 2016 16:55:22 +0100 Subject: Imported Upstream version 1.1.91 --- libnm/NetworkManager.h | 1 + libnm/libnm.ver | 19 ++- libnm/nm-access-point.c | 17 ++- libnm/nm-active-connection.c | 3 +- libnm/nm-client.c | 5 +- libnm/nm-dbus-helpers.c | 7 +- libnm/nm-device-adsl.c | 6 +- libnm/nm-device-bond.c | 9 +- libnm/nm-device-bridge.c | 9 +- libnm/nm-device-bt.c | 9 +- libnm/nm-device-ethernet.c | 11 +- libnm/nm-device-generic.c | 2 +- libnm/nm-device-infiniband.c | 9 +- libnm/nm-device-ip-tunnel.c | 9 +- libnm/nm-device-macvlan.c | 11 +- libnm/nm-device-modem.c | 9 +- libnm/nm-device-olpc-mesh.c | 7 +- libnm/nm-device-team.c | 9 +- libnm/nm-device-tun.c | 9 +- libnm/nm-device-vlan.c | 11 +- libnm/nm-device-vxlan.c | 9 +- libnm/nm-device-wifi.c | 15 +-- libnm/nm-device-wimax.c | 9 +- libnm/nm-device.c | 216 ++++++++++++++++++++++++++++-- libnm/nm-device.h | 24 +++- libnm/nm-dhcp-config.c | 2 +- libnm/nm-dhcp4-config.c | 2 +- libnm/nm-dhcp6-config.c | 2 +- libnm/nm-ifcfg-rh-docs.xml | 10 +- libnm/nm-ip-config.c | 2 +- libnm/nm-ip4-config.c | 2 +- libnm/nm-ip6-config.c | 2 +- libnm/nm-manager.c | 9 +- libnm/nm-object-cache.c | 4 +- libnm/nm-object.c | 10 +- libnm/nm-property-docs.xml | 11 +- libnm/nm-remote-connection.c | 10 +- libnm/nm-remote-settings.c | 12 +- libnm/nm-secret-agent-old.c | 3 +- libnm/nm-setting-docs.xml | 11 +- libnm/nm-vpn-connection.c | 3 +- libnm/nm-vpn-editor.c | 3 +- libnm/nm-vpn-plugin-old.c | 47 ++++++- libnm/nm-vpn-service-plugin.c | 6 +- libnm/nm-vpn-service-plugin.h | 4 + libnm/nm-wimax-nsp.c | 9 +- libnm/tests/Makefile.am | 4 +- libnm/tests/Makefile.in | 3 +- libnm/tests/libnm-test-launch.sh | 7 - libnm/tests/test-nm-client.c | 3 +- libnm/tests/test-remote-settings-client.c | 2 +- libnm/tests/test-secret-agent.c | 4 +- 52 files changed, 441 insertions(+), 191 deletions(-) delete mode 100755 libnm/tests/libnm-test-launch.sh (limited to 'libnm') diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h index 35cd07ae..b5dab8fd 100644 --- a/libnm/NetworkManager.h +++ b/libnm/NetworkManager.h @@ -88,6 +88,7 @@ #include #include #include +#include #include #undef __NETWORKMANAGER_H_INSIDE__ diff --git a/libnm/libnm.ver b/libnm/libnm.ver index ed008eee..e3ede1d2 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -821,6 +821,17 @@ global: nm_vpn_plugin_error_get_type; nm_vpn_plugin_error_quark; nm_vpn_plugin_failure_get_type; + nm_vpn_plugin_old_disconnect; + nm_vpn_plugin_old_failure; + nm_vpn_plugin_old_get_connection; + nm_vpn_plugin_old_get_secret_flags; + nm_vpn_plugin_old_get_state; + nm_vpn_plugin_old_get_type; + nm_vpn_plugin_old_read_vpn_details; + nm_vpn_plugin_old_secrets_required; + nm_vpn_plugin_old_set_ip4_config; + nm_vpn_plugin_old_set_login_banner; + nm_vpn_plugin_old_set_state; nm_vpn_service_state_get_type; nm_wep_key_type_get_type; nm_wimax_nsp_connection_valid; @@ -864,6 +875,9 @@ global: nm_connection_get_setting_vxlan; nm_connection_verify_secrets; nm_device_ethernet_get_s390_subchannels; + nm_device_get_applied_connection; + nm_device_get_applied_connection_async; + nm_device_get_applied_connection_finish; nm_device_get_lldp_neighbors; nm_device_get_metered; nm_device_get_nm_plugin_missing; @@ -926,7 +940,6 @@ global: nm_lldp_neighbor_new; nm_lldp_neighbor_ref; nm_lldp_neighbor_unref; - nm_manager_get_all_devices; nm_metered_get_type; nm_setting_802_1x_check_cert_scheme; nm_setting_bridge_get_multicast_snooping; @@ -939,11 +952,12 @@ global: nm_setting_gsm_get_sim_id; nm_setting_gsm_get_sim_operator_id; nm_setting_ip4_config_get_dhcp_fqdn; - nm_setting_ip4_config_get_dhcp_timeout; nm_setting_ip6_config_addr_gen_mode_get_type; nm_setting_ip6_config_get_addr_gen_mode; nm_setting_ip_config_add_dns_option; nm_setting_ip_config_clear_dns_options; + nm_setting_ip_config_get_dad_timeout; + nm_setting_ip_config_get_dhcp_timeout; nm_setting_ip_config_get_dns_option; nm_setting_ip_config_get_num_dns_options; nm_setting_ip_config_has_dns_options; @@ -1003,6 +1017,7 @@ global: nm_setting_wired_wake_on_lan_get_type; nm_setting_wireless_get_powersave; nm_setting_wireless_get_mac_address_randomization; + nm_setting_wireless_powersave_get_type; nm_utils_bond_mode_int_to_string; nm_utils_bond_mode_string_to_int; nm_utils_enum_from_str; diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c index 852b2808..d1dd1c3f 100644 --- a/libnm/nm-access-point.c +++ b/libnm/nm-access-point.c @@ -19,21 +19,20 @@ * Copyright 2007 - 2011 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-access-point.h" #include -#include -#include -#include -#include -#include +#include "nm-connection.h" +#include "nm-setting-connection.h" +#include "nm-setting-wireless.h" +#include "nm-setting-wireless-security.h" +#include "nm-utils.h" -#include "nm-default.h" -#include "nm-access-point.h" #include "nm-dbus-interface.h" #include "nm-object-private.h" -#include "nm-macros-internal.h" G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT) diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c index b1608027..a1636598 100644 --- a/libnm/nm-active-connection.c +++ b/libnm/nm-active-connection.c @@ -19,11 +19,10 @@ * Copyright 2008 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include "nm-default.h" #include "nm-dbus-interface.h" #include "nm-active-connection.h" #include "nm-object-private.h" diff --git a/libnm/nm-client.c b/libnm/nm-client.c index dc6db0aa..57a43ca8 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -19,12 +19,11 @@ * Copyright 2007 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include "nm-default.h" +#include "nm-utils.h" #include "nm-client.h" #include "nm-manager.h" #include "nm-remote-settings.h" diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c index 3c039375..3076674a 100644 --- a/libnm/nm-dbus-helpers.c +++ b/libnm/nm-dbus-helpers.c @@ -18,14 +18,13 @@ * Copyright 2013 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-dbus-helpers.h" #include -#include "nm-default.h" -#include "nm-dbus-helpers.h" #include "nm-dbus-interface.h" -#include "nm-macros-internal.h" static GBusType nm_bus = G_BUS_TYPE_SYSTEM; diff --git a/libnm/nm-device-adsl.c b/libnm/nm-device-adsl.c index b9d609da..7608ff39 100644 --- a/libnm/nm-device-adsl.c +++ b/libnm/nm-device-adsl.c @@ -19,16 +19,18 @@ * Copyright 2009 - 2011 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-device-adsl.h" + +#include + #include "nm-device-private.h" #include "nm-object-private.h" #include "nm-setting-adsl.h" #include "nm-setting-connection.h" -#include G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE) diff --git a/libnm/nm-device-bond.c b/libnm/nm-device-bond.c index 3bfcb94c..483d9d00 100644 --- a/libnm/nm-device-bond.c +++ b/libnm/nm-device-bond.c @@ -18,15 +18,14 @@ * Copyright 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-bond.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-bond.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c index 5afc46e3..c6bf1359 100644 --- a/libnm/nm-device-bridge.c +++ b/libnm/nm-device-bridge.c @@ -18,15 +18,14 @@ * Copyright 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-bridge.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-bridge.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-bt.c b/libnm/nm-device-bt.c index f89be172..dc28ad89 100644 --- a/libnm/nm-device-bt.c +++ b/libnm/nm-device-bt.c @@ -19,15 +19,14 @@ * Copyright 2007 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-bluetooth.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-bt.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index 537a6f4c..88a7c432 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -19,16 +19,15 @@ * Copyright 2007 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-wired.h" +#include "nm-setting-pppoe.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-ethernet.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-generic.c b/libnm/nm-device-generic.c index 9aeb9bfa..069ca0ea 100644 --- a/libnm/nm-device-generic.c +++ b/libnm/nm-device-generic.c @@ -18,7 +18,7 @@ * Copyright 2013 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include diff --git a/libnm/nm-device-infiniband.c b/libnm/nm-device-infiniband.c index ab3a0bb7..6770b1c5 100644 --- a/libnm/nm-device-infiniband.c +++ b/libnm/nm-device-infiniband.c @@ -18,15 +18,14 @@ * Copyright 2011 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-infiniband.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-infiniband.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-ip-tunnel.c b/libnm/nm-device-ip-tunnel.c index b43b0412..f5b3cad6 100644 --- a/libnm/nm-device-ip-tunnel.c +++ b/libnm/nm-device-ip-tunnel.c @@ -18,15 +18,14 @@ * Copyright 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-ip-tunnel.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-ip-tunnel.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-macvlan.c b/libnm/nm-device-macvlan.c index 3b4bfd35..825c9197 100644 --- a/libnm/nm-device-macvlan.c +++ b/libnm/nm-device-macvlan.c @@ -18,16 +18,15 @@ * Copyright 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-macvlan.h" +#include "nm-setting-wired.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-macvlan.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-modem.c b/libnm/nm-device-modem.c index 9fe5acb6..d442dc03 100644 --- a/libnm/nm-device-modem.c +++ b/libnm/nm-device-modem.c @@ -19,15 +19,14 @@ * Copyright 2008 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-gsm.h" +#include "nm-setting-cdma.h" -#include "nm-default.h" #include "nm-device-modem.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-olpc-mesh.c b/libnm/nm-device-olpc-mesh.c index 8e6cb1ab..984ea4e4 100644 --- a/libnm/nm-device-olpc-mesh.c +++ b/libnm/nm-device-olpc-mesh.c @@ -18,14 +18,13 @@ * Copyright 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-olpc-mesh.h" -#include "nm-default.h" #include "nm-device-olpc-mesh.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c index c38c58c1..b855d5ec 100644 --- a/libnm/nm-device-team.c +++ b/libnm/nm-device-team.c @@ -18,15 +18,14 @@ * Copyright 2013 Jiri Pirko */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-team.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-team.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-tun.c b/libnm/nm-device-tun.c index ce2558f0..b227f5b1 100644 --- a/libnm/nm-device-tun.c +++ b/libnm/nm-device-tun.c @@ -18,16 +18,15 @@ * Copyright 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-tun.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-tun.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c index b285eea9..843dda02 100644 --- a/libnm/nm-device-vlan.c +++ b/libnm/nm-device-vlan.c @@ -18,16 +18,15 @@ * Copyright 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-vlan.h" +#include "nm-setting-wired.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-vlan.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-vxlan.c b/libnm/nm-device-vxlan.c index 4718080e..335498ee 100644 --- a/libnm/nm-device-vxlan.c +++ b/libnm/nm-device-vxlan.c @@ -18,15 +18,14 @@ * Copyright 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-vxlan.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-vxlan.h" #include "nm-device-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c index 9019e038..3fde324c 100644 --- a/libnm/nm-device-wifi.c +++ b/libnm/nm-device-wifi.c @@ -19,24 +19,23 @@ * Copyright 2007 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-device-wifi.h" #include -#include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-wireless.h" +#include "nm-setting-wireless-security.h" +#include "nm-utils.h" -#include "nm-default.h" -#include "nm-device-wifi.h" #include "nm-access-point.h" #include "nm-device-private.h" #include "nm-object-private.h" #include "nm-object-cache.h" #include "nm-core-internal.h" #include "nm-dbus-helpers.h" -#include "nm-macros-internal.h" #include "nmdbus-device-wifi.h" diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c index 55658a59..e26efedb 100644 --- a/libnm/nm-device-wimax.c +++ b/libnm/nm-device-wimax.c @@ -19,15 +19,14 @@ * Copyright 2009 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-setting-connection.h" +#include "nm-setting-wimax.h" +#include "nm-utils.h" -#include "nm-default.h" #include "nm-device-wimax.h" #include "nm-wimax-nsp.h" #include "nm-object-private.h" diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 7d57b526..fa32b4c7 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -19,13 +19,13 @@ * Copyright 2007 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" -#include +#include "nm-device.h" +#include #include -#include "nm-default.h" #include "nm-dbus-interface.h" #include "nm-active-connection.h" #include "nm-device-ethernet.h" @@ -44,7 +44,6 @@ #include "nm-device-generic.h" #include "nm-device-ip-tunnel.h" #include "nm-device-macvlan.h" -#include "nm-device.h" #include "nm-device-private.h" #include "nm-dhcp4-config.h" #include "nm-dhcp6-config.h" @@ -58,7 +57,6 @@ #include "nm-dbus-helpers.h" #include "nm-device-tun.h" #include "nm-setting-connection.h" -#include "nm-macros-internal.h" #include "nmdbus-device.h" @@ -343,6 +341,7 @@ static GType _nm_device_gtype_from_dtype (NMDeviceType dtype) { switch (dtype) { + case NM_DEVICE_TYPE_VETH: case NM_DEVICE_TYPE_ETHERNET: return NM_TYPE_DEVICE_ETHERNET; case NM_DEVICE_TYPE_WIFI: @@ -1821,9 +1820,23 @@ get_type_name (NMDevice *device) return _("VLAN"); case NM_DEVICE_TYPE_ADSL: return _("ADSL"); - default: - return _("Unknown"); + case NM_DEVICE_TYPE_MACVLAN: + return _("MACVLAN"); + case NM_DEVICE_TYPE_VXLAN: + return _("VXLAN"); + case NM_DEVICE_TYPE_IP_TUNNEL: + return _("IPTunnel"); + case NM_DEVICE_TYPE_TUN: + return _("Tun"); + case NM_DEVICE_TYPE_VETH: + return _("Veth"); + case NM_DEVICE_TYPE_GENERIC: + case NM_DEVICE_TYPE_UNUSED1: + case NM_DEVICE_TYPE_UNUSED2: + case NM_DEVICE_TYPE_UNKNOWN: + break; } + return _("Unknown"); } static char * @@ -2168,6 +2181,9 @@ nm_device_is_software (NMDevice *device) * nm_device_reapply: * @device: a #NMDevice * @connection: the #NMConnection to replace the applied settings with or %NULL to reuse existing + * @version_id: zero or the expected version id of the applied connection. If specified + * and the version id mismatches, the call fails without modification. This allows to + * catch concurrent accesses. * @flags: always set this to zero * @cancellable: a #GCancellable, or %NULL * @error: location for a #GError, or %NULL @@ -2182,7 +2198,8 @@ nm_device_is_software (NMDevice *device) gboolean nm_device_reapply (NMDevice *device, NMConnection *connection, - guint flags, + guint64 version_id, + guint32 flags, GCancellable *cancellable, GError **error) { @@ -2198,7 +2215,7 @@ nm_device_reapply (NMDevice *device, ret = nmdbus_device_call_reapply_sync (NM_DEVICE_GET_PRIVATE (device)->proxy, - dict, flags, cancellable, error); + dict, version_id, flags, cancellable, error); if (error && *error) g_dbus_error_strip_remote_error (*error); return ret; @@ -2227,6 +2244,9 @@ device_reapply_cb (GObject *proxy, * nm_device_reapply_async: * @device: a #NMDevice * @connection: the #NMConnection to replace the applied settings with or %NULL to reuse existing + * @version_id: zero or the expected version id of the applied connection. If specified + * and the version id mismatches, the call fails without modification. This allows to + * catch concurrent accesses. * @flags: always set this to zero * @cancellable: a #GCancellable, or %NULL * @callback: callback to be called when the reapply operation completes @@ -2240,7 +2260,8 @@ device_reapply_cb (GObject *proxy, void nm_device_reapply_async (NMDevice *device, NMConnection *connection, - guint flags, + guint64 version_id, + guint32 flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -2259,7 +2280,7 @@ nm_device_reapply_async (NMDevice *device, nm_device_reapply_async); nmdbus_device_call_reapply (NM_DEVICE_GET_PRIVATE (device)->proxy, - dict, flags, cancellable, + dict, version_id, flags, cancellable, device_reapply_cb, simple); } @@ -2292,6 +2313,179 @@ nm_device_reapply_finish (NMDevice *device, return g_simple_async_result_get_op_res_gboolean (simple); } +/*****************************************************************************/ + +/** + * nm_device_get_applied_connection: + * @device: a #NMDevice + * @flags: the flags argument. Currently this value must always be zero. + * @version_id: (out): (allow-none): returns the current version id of + * the applied connection + * @cancellable: a #GCancellable, or %NULL + * @error: location for a #GError, or %NULL + * + * Fetch the currently applied connection on the device. + * + * Returns: (transfer full): a %NMConnection with the currently applied settings + * or %NULL on error. + * + * Since: 1.2 + **/ +NMConnection * +nm_device_get_applied_connection (NMDevice *device, + guint32 flags, + guint64 *version_id, + GCancellable *cancellable, + GError **error) +{ + gs_unref_variant GVariant *dict = NULL; + guint64 my_version_id; + gboolean success; + NMConnection *connection; + + g_return_val_if_fail (NM_IS_DEVICE (device), NULL); + g_return_val_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable), NULL); + g_return_val_if_fail (!error || !*error, NULL); + + success = nmdbus_device_call_get_applied_connection_sync (NM_DEVICE_GET_PRIVATE (device)->proxy, + flags, &dict, &my_version_id, cancellable, error); + if (!success) { + if (error && *error) + g_dbus_error_strip_remote_error (*error); + return NULL; + } + + connection = nm_simple_connection_new_from_dbus (dict, error); + if (!connection) + return NULL; + + NM_SET_OUT (version_id, my_version_id); + return connection; +} + +typedef struct { + NMConnection *connection; + guint64 version_id; +} GetAppliedConnectionData; + +static void +device_get_applied_connection_data_free (gpointer user_data) +{ + GetAppliedConnectionData *data = user_data; + + g_return_if_fail (data); + + g_object_unref (data->connection); + g_slice_free (GetAppliedConnectionData, data); +} + +static void +device_get_applied_connection_cb (GObject *proxy, + GAsyncResult *result, + gpointer user_data) +{ + gs_unref_object GSimpleAsyncResult *simple = user_data; + gs_unref_variant GVariant *dict = NULL; + guint64 my_version_id; + GError *error = NULL; + NMConnection *connection; + GetAppliedConnectionData *data; + + if (!nmdbus_device_call_get_applied_connection_finish (NMDBUS_DEVICE (proxy), &dict, &my_version_id, result, &error)) { + g_dbus_error_strip_remote_error (error); + g_simple_async_result_take_error (simple, error); + goto out; + } + + connection = nm_simple_connection_new_from_dbus (dict, &error); + if (!connection) { + g_simple_async_result_take_error (simple, error); + goto out; + } + + data = g_slice_new (GetAppliedConnectionData); + data->connection = connection; + data->version_id = my_version_id; + g_simple_async_result_set_op_res_gpointer (simple, data, device_get_applied_connection_data_free); + +out: + g_simple_async_result_complete (simple); +} + +/** + * nm_device_get_applied_connection_async: + * @device: a #NMDevice + * @flags: the flags argument. Currently this value must always be zero. + * @cancellable: a #GCancellable, or %NULL + * @callback: callback to be called when the reapply operation completes + * @user_data: caller-specific data passed to @callback + * + * Asynchronously begins an get the a currently applied connection. + * + * Since: 1.2 + **/ +void +nm_device_get_applied_connection_async (NMDevice *device, + guint32 flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *simple; + + g_return_if_fail (NM_IS_DEVICE (device)); + g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable)); + + simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data, + nm_device_get_applied_connection_async); + + nmdbus_device_call_get_applied_connection (NM_DEVICE_GET_PRIVATE (device)->proxy, + flags, cancellable, + device_get_applied_connection_cb, simple); +} + +/** + * nm_device_get_applied_connection_finish: + * @device: a #NMDevice + * @result: the result passed to the #GAsyncReadyCallback + * @version_id: (out): (allow-none): the current version id of the applied + * connection. + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_device_get_applied_connection_async(). + * + * Returns: (transfer full): a currently applied %NMConnection or %NULL in case + * of error. + * + * Since: 1.2 + **/ +NMConnection * +nm_device_get_applied_connection_finish (NMDevice *device, + GAsyncResult *result, + guint64 *version_id, + GError **error) +{ + GSimpleAsyncResult *simple; + GetAppliedConnectionData *data; + + g_return_val_if_fail (NM_IS_DEVICE (device), NULL); + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (device), nm_device_get_applied_connection_async), NULL); + g_return_val_if_fail (!error || !*error, NULL); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + + data = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (data, NULL); + g_return_val_if_fail (NM_IS_CONNECTION (data->connection), NULL); + + NM_SET_OUT (version_id, data->version_id); + return g_object_ref (data->connection); +} + +/*****************************************************************************/ + /** * nm_device_disconnect: * @device: a #NMDevice diff --git a/libnm/nm-device.h b/libnm/nm-device.h index bf845ceb..c16ead9e 100644 --- a/libnm/nm-device.h +++ b/libnm/nm-device.h @@ -140,13 +140,15 @@ char ** nm_device_disambiguate_names (NMDevice **devices, NM_AVAILABLE_IN_1_2 gboolean nm_device_reapply (NMDevice *device, NMConnection *connection, - guint flags, + guint64 version_id, + guint32 flags, GCancellable *cancellable, GError **error); NM_AVAILABLE_IN_1_2 void nm_device_reapply_async (NMDevice *device, NMConnection *connection, - guint flags, + guint64 version_id, + guint32 flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -155,6 +157,24 @@ gboolean nm_device_reapply_finish (NMDevice *device, GAsyncResult *result, GError **error); +NM_AVAILABLE_IN_1_2 +NMConnection *nm_device_get_applied_connection (NMDevice *device, + guint32 flags, + guint64 *version_id, + GCancellable *cancellable, + GError **error); +NM_AVAILABLE_IN_1_2 +void nm_device_get_applied_connection_async (NMDevice *device, + guint32 flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_2 +NMConnection *nm_device_get_applied_connection_finish (NMDevice *device, + GAsyncResult *result, + guint64 *version_id, + GError **error); + gboolean nm_device_disconnect (NMDevice *device, GCancellable *cancellable, GError **error); diff --git a/libnm/nm-dhcp-config.c b/libnm/nm-dhcp-config.c index 7227abac..3161e296 100644 --- a/libnm/nm-dhcp-config.c +++ b/libnm/nm-dhcp-config.c @@ -19,7 +19,7 @@ * Copyright 2008 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include diff --git a/libnm/nm-dhcp4-config.c b/libnm/nm-dhcp4-config.c index 808edaa6..26e89c27 100644 --- a/libnm/nm-dhcp4-config.c +++ b/libnm/nm-dhcp4-config.c @@ -18,7 +18,7 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-dhcp4-config.h" #include "nm-object-private.h" diff --git a/libnm/nm-dhcp6-config.c b/libnm/nm-dhcp6-config.c index 3b2e81f8..f1556b20 100644 --- a/libnm/nm-dhcp6-config.c +++ b/libnm/nm-dhcp6-config.c @@ -18,7 +18,7 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-dhcp6-config.h" #include "nm-object-private.h" diff --git a/libnm/nm-ifcfg-rh-docs.xml b/libnm/nm-ifcfg-rh-docs.xml index 56c3c7b9..9bb7b401 100644 --- a/libnm/nm-ifcfg-rh-docs.xml +++ b/libnm/nm-ifcfg-rh-docs.xml @@ -157,7 +157,9 @@ meaning as 'never-default' property."/> - + + @@ -206,7 +208,7 @@ IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no" default="no" example="IPV6_PRIVACY=rfc30 - + - - + + \ No newline at end of file diff --git a/libnm/nm-ip-config.c b/libnm/nm-ip-config.c index fc4567c4..97fb0aa9 100644 --- a/libnm/nm-ip-config.c +++ b/libnm/nm-ip-config.c @@ -19,7 +19,7 @@ * Copyright 2008 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include diff --git a/libnm/nm-ip4-config.c b/libnm/nm-ip4-config.c index 26797dd7..a57fc30f 100644 --- a/libnm/nm-ip4-config.c +++ b/libnm/nm-ip4-config.c @@ -18,7 +18,7 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-ip4-config.h" #include "nm-object-private.h" diff --git a/libnm/nm-ip6-config.c b/libnm/nm-ip6-config.c index 8a6c966c..983c0465 100644 --- a/libnm/nm-ip6-config.c +++ b/libnm/nm-ip6-config.c @@ -18,7 +18,7 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-ip6-config.h" #include "nm-object-private.h" diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c index b4b7e0c7..17a51f24 100644 --- a/libnm/nm-manager.c +++ b/libnm/nm-manager.c @@ -19,13 +19,13 @@ * Copyright 2007 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-manager.h" #include -#include -#include "nm-default.h" -#include "nm-manager.h" +#include "nm-utils.h" #include "nm-device-ethernet.h" #include "nm-device-wifi.h" #include "nm-device-private.h" @@ -35,7 +35,6 @@ #include "nm-vpn-connection.h" #include "nm-object-cache.h" #include "nm-dbus-helpers.h" -#include "nm-macros-internal.h" #include "nmdbus-manager.h" diff --git a/libnm/nm-object-cache.c b/libnm/nm-object-cache.c index 82af1140..fa56ace5 100644 --- a/libnm/nm-object-cache.c +++ b/libnm/nm-object-cache.c @@ -18,10 +18,10 @@ * Copyright 2008 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include "nm-default.h" + #include "nm-object-cache.h" #include "nm-object.h" diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 143931f1..b35f6822 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -19,21 +19,21 @@ * Copyright 2007 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-object.h" #include #include #include -#include -#include "nm-default.h" + +#include "nm-utils.h" #include "nm-dbus-interface.h" -#include "nm-object.h" #include "nm-object-cache.h" #include "nm-object-private.h" #include "nm-dbus-helpers.h" #include "nm-client.h" #include "nm-core-internal.h" -#include "nm-macros-internal.h" static gboolean debug = FALSE; #define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); } diff --git a/libnm/nm-property-docs.xml b/libnm/nm-property-docs.xml index c0f57b0b..eacbddea 100644 --- a/libnm/nm-property-docs.xml +++ b/libnm/nm-property-docs.xml @@ -147,11 +147,12 @@ + - + @@ -168,8 +169,10 @@ + + @@ -268,7 +271,7 @@ - + @@ -283,7 +286,7 @@ - + @@ -334,7 +337,7 @@ - + diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index e2073784..d2b55bd8 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -19,14 +19,14 @@ * Copyright 2007 - 2011 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include -#include "nm-default.h" +#include "nm-dbus-interface.h" +#include "nm-utils.h" +#include "nm-setting-connection.h" + #include "nm-remote-connection.h" #include "nm-remote-connection-private.h" #include "nm-object-private.h" diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c index 480d7c19..b04f4f2a 100644 --- a/libnm/nm-remote-settings.c +++ b/libnm/nm-remote-settings.c @@ -19,14 +19,15 @@ * Copyright 2009 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-remote-settings.h" #include -#include -#include -#include "nm-default.h" -#include "nm-remote-settings.h" +#include "nm-dbus-interface.h" +#include "nm-connection.h" + #include "nm-client.h" #include "nm-remote-connection.h" #include "nm-remote-connection-private.h" @@ -34,7 +35,6 @@ #include "nm-dbus-helpers.h" #include "nm-object-private.h" #include "nm-core-internal.h" -#include "nm-macros-internal.h" #include "nmdbus-settings.h" diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c index 97bb287e..8edb224c 100644 --- a/libnm/nm-secret-agent-old.c +++ b/libnm/nm-secret-agent-old.c @@ -18,11 +18,10 @@ * Copyright 2010 - 2011 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include "nm-default.h" #include "nm-dbus-interface.h" #include "nm-secret-agent-old.h" #include "nm-enum-types.h" diff --git a/libnm/nm-setting-docs.xml b/libnm/nm-setting-docs.xml index 917edaab..7e08b114 100644 --- a/libnm/nm-setting-docs.xml +++ b/libnm/nm-setting-docs.xml @@ -150,11 +150,12 @@ + - + @@ -173,8 +174,10 @@ + + @@ -275,7 +278,7 @@ - + @@ -291,7 +294,7 @@ - + @@ -342,7 +345,7 @@ - + diff --git a/libnm/nm-vpn-connection.c b/libnm/nm-vpn-connection.c index f46dc0ca..4b96210b 100644 --- a/libnm/nm-vpn-connection.c +++ b/libnm/nm-vpn-connection.c @@ -19,9 +19,10 @@ * Copyright 2007 - 2012 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include + #include "nm-vpn-connection.h" #include "nm-dbus-interface.h" #include "nm-utils.h" diff --git a/libnm/nm-vpn-editor.c b/libnm/nm-vpn-editor.c index ba6bd5e0..86bd6947 100644 --- a/libnm/nm-vpn-editor.c +++ b/libnm/nm-vpn-editor.c @@ -19,7 +19,7 @@ * Copyright 2008 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-vpn-editor.h" @@ -44,6 +44,7 @@ nm_vpn_editor_default_init (NMVpnEditorInterface *iface) /** * nm_vpn_editor_get_widget: + * @editor: the #NMVpnEditor * * Returns: (transfer none): */ diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index cfc8c663..9bbac414 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -19,21 +19,20 @@ * Copyright 2007 - 2008 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-vpn-plugin-old.h" #include #include #include -#include "nm-default.h" -#include "nm-vpn-plugin-old.h" #include "nm-enum-types.h" #include "nm-utils.h" #include "nm-connection.h" #include "nm-dbus-helpers.h" #include "nm-core-internal.h" #include "nm-simple-connection.h" -#include "nm-macros-internal.h" #include "nmdbus-vpn-plugin.h" @@ -129,6 +128,11 @@ nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin) return connection; } +/** + * nm_vpn_plugin_old_get_state: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ NMVpnServiceState nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin) { @@ -137,6 +141,11 @@ nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin) return NM_VPN_PLUGIN_OLD_GET_PRIVATE (plugin)->state; } +/** + * nm_vpn_plugin_old_set_state: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin, NMVpnServiceState state) @@ -152,6 +161,11 @@ nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin, } } +/** + * nm_vpn_plugin_old_set_login_banner: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin, const char *banner) @@ -162,6 +176,11 @@ nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin, g_signal_emit (plugin, signals[LOGIN_BANNER], 0, banner); } +/** + * nm_vpn_plugin_old_failure: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin, NMVpnPluginFailure reason) @@ -171,6 +190,11 @@ nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin, g_signal_emit (plugin, signals[FAILURE], 0, reason); } +/** + * nm_vpn_plugin_old_disconnect: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ gboolean nm_vpn_plugin_old_disconnect (NMVpnPluginOld *plugin, GError **err) { @@ -277,6 +301,11 @@ schedule_fail_stop (NMVpnPluginOld *plugin) priv->fail_stop_id = g_idle_add (fail_stop, plugin); } +/** + * nm_vpn_plugin_old_set_config: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin, GVariant *config) @@ -316,6 +345,11 @@ nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin, g_signal_emit (plugin, signals[CONFIG], 0, config); } +/** + * nm_vpn_plugin_old_set_ip4_config: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin, GVariant *ip4_config) @@ -371,6 +405,11 @@ nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin, nm_vpn_plugin_old_set_state (plugin, NM_VPN_SERVICE_STATE_STARTED); } +/** + * nm_vpn_plugin_old_set_ip6_config: + * + * Deprecated: 1.2: replaced by NMVpnServicePlugin + */ void nm_vpn_plugin_old_set_ip6_config (NMVpnPluginOld *plugin, GVariant *ip6_config) diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index ae5af323..4e301e91 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -19,7 +19,7 @@ * Copyright 2007 - 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include "nm-vpn-service-plugin.h" @@ -27,14 +27,12 @@ #include #include -#include "nm-glib.h" #include "nm-enum-types.h" #include "nm-utils.h" #include "nm-connection.h" #include "nm-dbus-helpers.h" #include "nm-core-internal.h" #include "nm-simple-connection.h" -#include "nm-macros-internal.h" #include "nmdbus-vpn-plugin.h" @@ -315,8 +313,6 @@ nm_vpn_service_plugin_set_config (NMVpnServicePlugin *plugin, (void) g_variant_lookup (config, NM_VPN_PLUGIN_CONFIG_HAS_IP4, "b", &priv->has_ip4); (void) g_variant_lookup (config, NM_VPN_PLUGIN_CONFIG_HAS_IP6, "b", &priv->has_ip6); - g_warn_if_fail (priv->has_ip4 || priv->has_ip6); - /* Record the items that need to also be inserted into the * ip4config, for compatibility with older daemons. */ diff --git a/libnm/nm-vpn-service-plugin.h b/libnm/nm-vpn-service-plugin.h index f8b4ff87..29319189 100644 --- a/libnm/nm-vpn-service-plugin.h +++ b/libnm/nm-vpn-service-plugin.h @@ -22,6 +22,10 @@ #ifndef __NM_VPN_SERVICE_PLUGIN_H__ #define __NM_VPN_SERVICE_PLUGIN_H__ +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only can be included directly." +#endif + #include #include #include diff --git a/libnm/nm-wimax-nsp.c b/libnm/nm-wimax-nsp.c index 9fbc6ea1..d544b0d4 100644 --- a/libnm/nm-wimax-nsp.c +++ b/libnm/nm-wimax-nsp.c @@ -18,15 +18,14 @@ * Copyright 2011 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include -#include -#include -#include +#include "nm-connection.h" +#include "nm-setting-connection.h" +#include "nm-setting-wimax.h" -#include "nm-default.h" #include "nm-wimax-nsp.h" #include "nm-dbus-interface.h" #include "nm-object-private.h" diff --git a/libnm/tests/Makefile.am b/libnm/tests/Makefile.am index ddcf50be..fd9edb6f 100644 --- a/libnm/tests/Makefile.am +++ b/libnm/tests/Makefile.am @@ -21,7 +21,7 @@ noinst_PROGRAMS = $(TESTS) if WITH_VALGRIND @VALGRIND_RULES@ --launch-dbus else -LOG_COMPILER = $(srcdir)/libnm-test-launch.sh +LOG_COMPILER = $(top_srcdir)/tools/run-test-dbus-session.sh endif TESTS = test-nm-client test-remote-settings-client test-secret-agent @@ -40,5 +40,3 @@ test_secret_agent_SOURCES = \ $(top_builddir)/shared/nm-test-libnm-utils.h \ test-secret-agent.c endif - -EXTRA_DIST = libnm-test-launch.sh diff --git a/libnm/tests/Makefile.in b/libnm/tests/Makefile.in index 0b553a78..455a0761 100644 --- a/libnm/tests/Makefile.in +++ b/libnm/tests/Makefile.in @@ -709,7 +709,7 @@ with_valgrind = @with_valgrind@ @ENABLE_TESTS_TRUE@ $(top_builddir)/libnm/libnm.la \ @ENABLE_TESTS_TRUE@ $(GLIB_LIBS) -@ENABLE_TESTS_TRUE@@WITH_VALGRIND_FALSE@LOG_COMPILER = $(srcdir)/libnm-test-launch.sh +@ENABLE_TESTS_TRUE@@WITH_VALGRIND_FALSE@LOG_COMPILER = $(top_srcdir)/tools/run-test-dbus-session.sh @ENABLE_TESTS_TRUE@test_nm_client_SOURCES = \ @ENABLE_TESTS_TRUE@ $(top_builddir)/shared/nm-test-utils-impl.c \ @ENABLE_TESTS_TRUE@ $(top_builddir)/shared/nm-test-libnm-utils.h \ @@ -725,7 +725,6 @@ with_valgrind = @with_valgrind@ @ENABLE_TESTS_TRUE@ $(top_builddir)/shared/nm-test-libnm-utils.h \ @ENABLE_TESTS_TRUE@ test-secret-agent.c -EXTRA_DIST = libnm-test-launch.sh all: all-am .SUFFIXES: diff --git a/libnm/tests/libnm-test-launch.sh b/libnm/tests/libnm-test-launch.sh deleted file mode 100755 index 980f8345..00000000 --- a/libnm/tests/libnm-test-launch.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Spawn DBus -eval `dbus-launch --sh-syntax` -trap "kill $DBUS_SESSION_BUS_PID" EXIT - -"$@" diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index 5be69142..9e9d480e 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -18,7 +18,7 @@ * */ -#include "config.h" +#include "nm-default.h" #include #include @@ -101,6 +101,7 @@ test_device_added (void) /* Try deleting the device via the ordinary NM interface, which should fail */ nm_device_delete (device, NULL, &error); g_assert_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_SOFTWARE); + g_clear_error (&error); g_object_unref (client); g_clear_pointer (&sinfo, nmtstc_service_cleanup); diff --git a/libnm/tests/test-remote-settings-client.c b/libnm/tests/test-remote-settings-client.c index 1a3c7988..8f59656d 100644 --- a/libnm/tests/test-remote-settings-client.c +++ b/libnm/tests/test-remote-settings-client.c @@ -18,7 +18,7 @@ * */ -#include "config.h" +#include "nm-default.h" #include #include diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c index f8aedd23..97561866 100644 --- a/libnm/tests/test-secret-agent.c +++ b/libnm/tests/test-secret-agent.c @@ -18,13 +18,13 @@ * */ -#include "config.h" +#include "nm-default.h" #include #include #include -#include +#include "nm-secret-agent-old.h" #include "nm-test-libnm-utils.h" -- cgit 1.3.0-6-gf8a5