libpldmresponder: bios: fixed resp in setAttribute
Add response encode in setBIOSAttributeCurrentValue.
Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: I12ce91a4dd00c6ddce1f41ed5206b793f4926629
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index 036a2ec..1819030 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -284,7 +284,14 @@
rc = biosConfig.setAttrValue(attributeField.ptr, attributeField.length);
- return ccOnlyResponse(request, rc);
+ Response response(
+ sizeof(pldm_msg_hdr) + PLDM_SET_BIOS_ATTR_CURR_VAL_RESP_BYTES, 0);
+ auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
+
+ encode_set_bios_attribute_current_value_resp(request->hdr.instance_id, rc,
+ 0, responsePtr);
+
+ return response;
}
} // namespace bios