HomeClusterLabs Projects

Refactor: libcrmservice: simplify DBus property queries

Description

Refactor: libcrmservice: simplify DBus property queries

Previously, pcmk_dbus_get_property() seemed partially designed to be able to
query all properties if its name argument was NULL. However, we never use it
like that, and it would not work anyway (for example, it returns only a single
value).

That was inefficient since it would always do a DBus "GetAll" method to get all
the properties, then parse all the results, and grab the value of the one
property that matched name.

Now, use the DBus "Get" method for a single property instead.

As a side effect, this eliminates a coverity false positive in the original
implementation.

Details

Provenance
kgaillotAuthored on Sep 24 2020, 6:48 PM
Parents
rP76f9f3b54896: Refactor: libcrmservice: define constants for custom DBus errors
Branches
Unknown
Tags
Unknown

Event Timeline