diff --git a/src/analytics/ruleeng.cc b/src/analytics/ruleeng.cc index 07c0da9970e..80fd86c7951 100644 --- a/src/analytics/ruleeng.cc +++ b/src/analytics/ruleeng.cc @@ -555,12 +555,14 @@ static size_t DomObjectWalk(const pugi::xml_node& parent, const VizMsg *rmsg, std::map keymap; std::map::iterator it; const char *table; + const char *nodetype; std::string rowkey; for (pugi::xml_node node = parent.first_child(); node; node = node.next_sibling()) { table = node.attribute("key").value(); - if (strcmp(table, "")) { + nodetype = node.attribute("type").value(); + if (strcmp(table, "") && strcmp(nodetype, "")) { //check if Sandesh node has a map attribute; key type of map should not be extracted, only key value of attribute should be extracted rowkey = std::string(node.child_value()); TXMLProtocol::unescapeXMLControlChars(rowkey); it = keymap.find(table); @@ -829,7 +831,6 @@ bool Ruleeng::rule_execute(const VizMsg *vmsgp, bool uveproc, DbHandler *db, const SandeshXMLMessage *sxmsg = static_cast(vmsgp->msg); const pugi::xml_node &parent(sxmsg->GetMessageNode()); - remove_identifier(parent); handle_object_log(parent, vmsgp, db, header, db_cb);