item_updater: Ignore base version when trying to free up priority.
- There is a bug in our code where a user can try to allocate the
existing priority of a version to itself and this would cause
all subsequent priorities to be incremented by 2 instead of 1.
- By checking the base versionId we can skip the operation to free
the priority of the base version since it will be reassigned.
Resolves openbmc/openbmc#2075
Change-Id: Ice21d701bb2e964c5734273f4e8a3821b96f4830
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/activation.cpp b/activation.cpp
index 56b1b67..fd54ccd 100755
--- a/activation.cpp
+++ b/activation.cpp
@@ -212,7 +212,7 @@
uint8_t RedundancyPriority::priority(uint8_t value)
{
- parent.parent.freePriority(value);
+ parent.parent.freePriority(value, parent.versionId);
if(parent.parent.isLowestPriority(value))
{