Fix invalid argument error in CollectionStatus set
Trying to do set-property on com.ibm.VPD.Manager's "CollectionStatus"
property currently results in an invalid argument error being thrown to
sender even though the requested property gets updated. This commit
fixes this issue.
Test:
```
- Use busctl set-property to update "CollectionStatus" property
- Observe no invalid arguments error returned, and desired value is
updated
```
Change-Id: I4f4ef10afb3cec09b711fe5c48e66e2aaf3118f2
Signed-off-by: Souvik Roy <souvikroyofficial10@gmail.com>
diff --git a/vpd-manager/src/manager.cpp b/vpd-manager/src/manager.cpp
index 8341a9e..caf8c40 100644
--- a/vpd-manager/src/manager.cpp
+++ b/vpd-manager/src/manager.cpp
@@ -124,9 +124,9 @@
// Indicates FRU VPD collection for the system has not started.
iFace->register_property_rw<std::string>(
"CollectionStatus", sdbusplus::vtable::property_::emits_change,
- [this](const std::string l_currStatus, const auto&) {
+ [this](const std::string& l_currStatus, const auto&) {
m_vpdCollectionStatus = l_currStatus;
- return 0;
+ return true;
},
[this](const auto&) { return m_vpdCollectionStatus; });