}\r
\r
//logger.debug("Number of table entries: " + tableVars.size());\r
- int tmpCount = 0;//TODO: tmpCount's init value is 0, based on that port number begins from 1. Always ok?\r
+ \r
+ /*\r
+ * Bug fix: the valid port number in tableVars does not begin from 1 always. And the valid port number in\r
+ * tableVars does not be continuous always.\r
+ * For example, as to a device whose model is H3C S6800-4C, when the second slot is used only, the valid port\r
+ * number in tableVars will be 33~57, 61, 26446. There are also other similar situations.\r
+ * In those cases, there will be some problems when using tmpCount for decision.\r
+ * */\r
+ //int tmpCount = 0;//TODO: tmpCount's init value is 0, based on that port number begins from 1. Always ok?\r
for(int i = 0; i < tableVars.size(); i++){\r
SNMPSequence pair = (SNMPSequence)(tableVars.getSNMPObjectAt(i));\r
SNMPObjectIdentifier snmpOID = (SNMPObjectIdentifier)pair.getSNMPObjectAt(0);\r
logger.debug("ERROR: readPortStateEntries(): for node {}, call retrievePortNumFromChassisOIDAtEnd(), given snmpOIDstr {}, fail", comInterface.getHostAddress(), snmpOIDstr);\r
return null;\r
}\r
- if(portNum != tmpCount + 1){\r
- logger.trace("readPortStateEntries(): for node {}, the {} port state entries, port {} is followed by port {}, so skip the ports afterward", comInterface.getHostAddress(), tmpCount, portNum);\r
- return table;\r
- }\r
- else\r
- tmpCount = portNum;\r
+ //if(portNum != tmpCount + 1){\r
+ // logger.trace("readPortStateEntries(): for node {}, the {} port state entries, port {} is followed by port {}, so skip the ports afterward", comInterface.getHostAddress(), tmpCount, portNum);\r
+ // return table;\r
+ //}\r
+ //else\r
+ // tmpCount = portNum;\r
\r
int valueInt = ((BigInteger)value.getValue()).intValue();\r
\r