Skip to content

Commit

Permalink
FIX minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Sep 11, 2024
1 parent 27b6508 commit 4ce5d3f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/cache/subCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ static bool subMatch
ngsiv2::SubAltType targetAltType
)
{
// If notifyOnMetadataChange is false and only metadata has been changed, we "downgrade" to ngsiv2::EntityUpdate
if (!cSubP->notifyOnMetadataChange && (targetAltType == ngsiv2::EntityChangeOnlyMetadata))
{
targetAltType = ngsiv2::EntityUpdate;
}

// Check alteration type
if (!matchAltType(cSubP, targetAltType))
{
Expand Down Expand Up @@ -490,12 +496,6 @@ static bool subMatch
return false;
}

// If notifyOnMetadataChange is false and only metadata has been changed, we "downgrade" to ngsiv2::EntityUpdate
if (!cSubP->notifyOnMetadataChange && (targetAltType == ngsiv2::EntityChangeOnlyMetadata))
{
targetAltType = ngsiv2::EntityUpdate;
}

//
// If one of the attribute names in the scope vector
// of the subscription has the same name as the incoming attribute. there is a match.
Expand Down

0 comments on commit 4ce5d3f

Please sign in to comment.