1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00
Eric Blake 2aa167cafd virdbus: don't force users to pass int for bool values
Use of an 'int' to represent a 'bool' value is confusing.  Just
because dbus made the mistake of cementing their 4-byte wire
format of dbus_bool_t into their API doesn't mean we have to
repeat the mistake.  With a little bit of finesse, we can
guarantee that we provide a large-enough value to the DBus
code, while still copying only the relevant one-byte bool
to the client code, and isolate the rest of our code base from
the DBus stupidity.

* src/util/virdbus.c (GET_NEXT_VAL): Add parameter.
(virDBusMessageIterDecode): Adjust all clients.
* src/util/virpolkit.c (virPolkitCheckAuth): Use nicer type.
* tests/virdbustest.c (testMessageSimple, testMessageStruct):
Test new behavior.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-11-19 08:20:39 -07:00
..
2014-09-03 09:36:13 -06:00
2014-07-16 13:35:26 +02:00
2014-07-16 13:35:26 +02:00
2014-01-01 16:34:13 +00:00
2012-04-02 09:33:54 -06:00
2014-09-18 13:37:12 +04:00
2014-09-03 09:36:13 -06:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2014-09-04 15:18:43 -06:00
2014-08-18 20:36:24 -06:00
2013-07-29 13:09:39 -06:00
2013-03-19 13:13:28 -06:00
2013-10-14 10:31:01 +01:00
2014-04-08 11:15:55 +01:00
2014-04-21 16:49:08 -06:00
2014-08-18 20:36:24 -06:00
2014-08-18 20:36:24 -06:00