Remove PDR's based on Terminus Handle
The current pldm infrastructure is written in way that
it deletes all the PDR's which are marked as "remote",when
we get a PDR refresh entire repository signal comes from remote
PLDM terminus,this does not work in muti-host scenario where BMC
talks to more than one HOST that talks pldm.
When a repository refresh signal comes form a remote PLDM terminus,
BMC is supposed to only delete the PDR's corresponding to the same
PLDM terminus.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I51f77c3f9537da722a00d97070674958c5baf1b4
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index d097b26..cc999a8 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -2,6 +2,8 @@
#include "pdr.hpp"
+#include <config.h>
+
#include <climits>
using namespace pldm::pdr;
@@ -23,7 +25,7 @@
RecordHandle Repo::addRecord(const PdrEntry& pdrEntry)
{
return pldm_pdr_add(repo, pdrEntry.data, pdrEntry.size,
- pdrEntry.handle.recordHandle, false);
+ pdrEntry.handle.recordHandle, false, TERMINUS_HANDLE);
}
const pldm_pdr_record* Repo::getFirstRecord(PdrEntry& pdrEntry)