Skip to content

Commit

Permalink
[vslib] Fix VirtualObjectIdManager multi arch logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 21, 2021
1 parent 5b888a3 commit 3951504
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/VirtualObjectIdManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,13 @@ sai_object_id_t VirtualObjectIdManager::allocateNewObjectId(

uint64_t objectIndex = m_oidIndexGenerator->increment(); // get new object index

const uint64_t indexMax = SAI_REDIS_OBJECT_INDEX_MAX;

if (objectIndex > SAI_REDIS_OBJECT_INDEX_MAX)
{
SWSS_LOG_THROW("no more object indexes available, given: 0x%" PRIu64 " but limit is 0x%" PRIu64 " ",
SWSS_LOG_THROW("no more object indexes available, given: 0x%" PRIx64 " but limit is 0x%" PRIx64 " ",
objectIndex,
SAI_REDIS_OBJECT_INDEX_MAX);
indexMax);
}

sai_object_id_t objectId = constructObjectId(objectType, switchIndex, objectIndex, m_globalContext);
Expand Down

0 comments on commit 3951504

Please sign in to comment.