pldmtool: fix multipart pdr printing
Use the size of all the received data, instead of only the last received
chunk, to print the pdr.
respCnt stores the size of the last PDR transferred payload, not the
size of the full pdr record that we are currently retrieving, because of
this, a multipart transmission of a pdr repo fails in the printing
stage.
Change-Id: Ifb292c1c42b4882e82cd238b81761ee4c1307d20
Signed-off-by: Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com>
diff --git a/pldmtool/pldm_platform_cmd.cpp b/pldmtool/pldm_platform_cmd.cpp
index 7fd011e..9d345e0 100644
--- a/pldmtool/pldm_platform_cmd.cpp
+++ b/pldmtool/pldm_platform_cmd.cpp
@@ -342,8 +342,8 @@
if (transferFlag == PLDM_PLATFORM_TRANSFER_END ||
transferFlag == PLDM_PLATFORM_TRANSFER_START_AND_END)
{
- printPDRMsg(nextRecordHndl, respCnt, recordData.data(),
- terminusHandle);
+ printPDRMsg(nextRecordHndl, recordData.size(),
+ recordData.data(), terminusHandle);
nextPartRequired = false;
recordHandle = nextRecordHndl;
dataTransferHandle = 0;