IPMI changes to skip updating non present cores

Cores which are not present need not to be updated
to inventory. This change is for skipping several
updates to inventory based on skipOn value.

Change-Id: I29e005a715ccae1df6eeaf35561a20896ecde0ac
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 1776ec7..c8d4fbf 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -318,11 +318,21 @@
             {
                 if (assertionSet.test(value.first))
                 {
+                    //Skip update if skipOn is ASSERT
+                    if (SkipAssertion::ASSERT == value.second.skip)
+                    {
+                        return IPMI_CC_OK;
+                    }
                     props.emplace(property.first, value.second.assert);
                     valid = true;
                 }
                 else if (deassertionSet.test(value.first))
                 {
+                    //Skip update if skipOn is DEASSERT
+                    if (SkipAssertion::DEASSERT == value.second.skip)
+                    {
+                        return IPMI_CC_OK;
+                    }
                     props.emplace(property.first, value.second.deassert);
                     valid = true;
                 }
@@ -333,6 +343,7 @@
             }
         }
     }
+
     objects.emplace(sensorInfo.sensorPath, std::move(interfaces));
     msg.append(std::move(objects));
     return updateToDbus(msg);