async: proxy: use variant in property-set
The DBus.Properties.Set method doesn't take a raw type, but a variant
holding the type (just like Get returns a variant). Fix the function
call so that the set value is wrapped in a variant.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3d33e0539c008dd66feeef0b866911768dae84e2
diff --git a/include/sdbusplus/async/proxy.hpp b/include/sdbusplus/async/proxy.hpp
index 2be9b38..be006dd 100644
--- a/include/sdbusplus/async/proxy.hpp
+++ b/include/sdbusplus/async/proxy.hpp
@@ -195,8 +195,9 @@
requires((S) && (P) && (I))
{
auto prop_intf = proxy(s, p, dbus_prop_intf);
- return prop_intf.template call<>(ctx, "Set", c_str(i), property.data(),
- std::forward<T>(value));
+ return prop_intf.template call<>(
+ ctx, "Set", c_str(i), property.data(),
+ std::variant<std::decay_t<T>>{std::forward<T>(value)});
}
private: