Possible bug fix for oid_key collision

This commit is contained in:
Larry Kim 2016-04-17 02:00:52 +09:00
parent f76739cb1b
commit 898798bd49
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ func (h *Host) HandleResponse(oids map[string]Data, result *gosnmp.SnmpPacket, a
break nextresult break nextresult
} }
} }
if strings.HasPrefix(variable.Name, oid_key) { if variable.Name == oid_key {
switch variable.Type { switch variable.Type {
// handle Metrics // handle Metrics
case gosnmp.Boolean, gosnmp.Integer, gosnmp.Counter32, gosnmp.Gauge32, case gosnmp.Boolean, gosnmp.Integer, gosnmp.Counter32, gosnmp.Gauge32,