Skip to content

Commit

Permalink
libguard: Fix to allow guarding of resolved guard
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Chirag Sharma committed Jul 29, 2021
1 parent 24a7e7c commit 49d7e62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libguard/guard_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 49d7e62

Please sign in to comment.