From 49d7e623b7608037cd1f6484c4bc45dcfba13069 Mon Sep 17 00:00:00 2001 From: Chirag Sharma Date: Mon, 12 Jul 2021 06:54:31 -0500 Subject: [PATCH] libguard: Fix to allow guarding of resolved guard Change: -Allowing to create guard of resolved guard record Test: -Created a guard record and deleted the same, tried to guard the same record. Signed-off-by: Chirag Sharma --- libguard/guard_interface.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libguard/guard_interface.cpp b/libguard/guard_interface.cpp index 0909e7e..b582214 100644 --- a/libguard/guard_interface.cpp +++ b/libguard/guard_interface.cpp @@ -194,6 +194,11 @@ GuardRecord create(const EntityPath& entityPath, uint32_t eId, uint8_t eType) file.write(offset + headerSize, &existGuard, sizeof(existGuard)); } + else if (existGuard.recordId == GUARD_RESOLVED) + { + lastPos++; + continue; + } else { guard_log(