diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-07-04 13:56:25 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-07-04 14:19:13 +0200 |
commit | 8d4fce4daf2ce0efc1c7c1e36482290b31fbb574 (patch) | |
tree | 4281193488e6ba9a3b8cbd7f8e034da7e5563b65 | |
parent | 2d23f2142c7e74bb4e752e5766af3c4073075629 (diff) | |
download | NetworkManager-8d4fce4daf2ce0efc1c7c1e36482290b31fbb574.tar.gz |
libnm: add (allow-none) annotations to nm_device_reapply()
The @connection argument can be NULL; add the (allow-none) annotation
otherwise calling the API with a NULL argument through GObject
introspection fails with:
Argument 1 does not allow None as a value
Fixes: 278fd4fb0fde3f290e366dab91fb6a49f9ff186c
(cherry picked from commit f3968264662b056722c721e5351a59f354f410e4)
(cherry picked from commit a03b867ba454bef67c879d422ad0213adda640d0)
(cherry picked from commit cd6c17cb21d40743703a285161b89aef10caa567)
-rw-r--r-- | libnm/nm-device.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 78c5e31dd1..bd2b240ed8 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1895,10 +1895,11 @@ 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. + * @connection: (allow-none): 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 @@ -1958,10 +1959,12 @@ 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. + * @connection: (allow-none): 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 |