Populate correct terminusId
Hardcoded terminus id 0 is used at multiple places in the current code.
Made changes to populate correct terminus id instead of hardcoded one.
Change-Id: I63cedcb38fb2d993e2e4a2b45846c19531d55839
Signed-off-by: ArchanaKakani <archana.kakani@ibm.com>
diff --git a/libpldmresponder/base.cpp b/libpldmresponder/base.cpp
index 4e9c885..e5030ec 100644
--- a/libpldmresponder/base.cpp
+++ b/libpldmresponder/base.cpp
@@ -25,12 +25,10 @@
namespace pldm
{
-
using Type = uint8_t;
namespace responder
{
-
using Cmd = std::vector<uint8_t>;
static const std::map<Type, Cmd> capabilities{
@@ -71,7 +69,6 @@
namespace base
{
-
Response Handler::getPLDMTypes(const pldm_msg* request,
size_t /*payloadLength*/)
{
@@ -242,13 +239,10 @@
Response Handler::getTID(const pldm_msg* request, size_t /*payloadLength*/)
{
- // assigned 1 to the bmc as the PLDM terminus
- uint8_t tid = 1;
-
Response response(sizeof(pldm_msg_hdr) + PLDM_GET_TID_RESP_BYTES, 0);
auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
- auto rc = encode_get_tid_resp(request->hdr.instance_id, PLDM_SUCCESS, tid,
- responsePtr);
+ auto rc = encode_get_tid_resp(request->hdr.instance_id, PLDM_SUCCESS,
+ TERMINUS_ID, responsePtr);
if (rc != PLDM_SUCCESS)
{
return ccOnlyResponse(request, rc);