diff options
author | Dan Williams <dcbw@redhat.com> | 2014-10-21 19:43:34 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-11-06 20:51:58 -0600 |
commit | 648270d46939aa7de8a87f4b2b63b92f5fb5278b (patch) | |
tree | c6e628c9b5521cd1dc699535bd5d9f71accd558a /libnm-core | |
parent | 098d655ef148445dedc23aea6d014881889b364f (diff) | |
download | NetworkManager-648270d46939aa7de8a87f4b2b63b92f5fb5278b.tar.gz |
libnm: cancel NMRemoteSettings/NMManager property reload when NM quits
If the operation isn't canceled it returns an error, printing this:
/libnm/client-nm-running:
(/home/dcbw/Development/fdo/NetworkManager/libnm/tests/.libs/lt-test-nm-client:17983): libnm-WARNING **: updated_properties: error reading NMRemoteSettings properties: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
/bin/sh: line 5: 17983 Trace/breakpoint trap ./libnm-test-launch.sh ${dir}$tst
FAIL: test-nm-client
which screws up testcases because they don't expect this message.
And in this case, since libnm knows that NM is exiting and will
just clear out the properties anyway, it's useless to print the message.
Diffstat (limited to 'libnm-core')
-rw-r--r-- | libnm-core/nm-core-internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 48295f7821..fced4ffe3d 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -68,6 +68,12 @@ #include "nm-version.h" #include "nm-vpn-dbus-interface.h" +#define NM_UTILS_CLEAR_CANCELLABLE(c) \ + if (c) { \ + g_cancellable_cancel (c); \ + g_clear_object (&c); \ + } + const char *_nm_setting_ip4_config_get_address_label (NMSettingIP4Config *setting, guint32 i); gboolean _nm_setting_ip4_config_add_address_with_label (NMSettingIP4Config *setting, |