Hi,
I'm considering using Mibble in an application I need to put together,
and while playing around I found a bug in the interface between Mibble
and the Westhawk SNMP stack. In the Mibble MIB browser, if you
attempt a Set operation on a counter or gauge, you get a 'Bad value
error'. This is because the type of the unsigned integer not being
set, and it defaults to TimeTicks.
I've modified the code as below and it now works ok for me.
In SNMPManager.java the method
public AsnObject createAsnValue(SnmpRequest request) throws SnmpException {
...
...
} else if (type.hasTag(MibTypeTag.APPLICATION_CATEGORY, 1)) {
// Counter
//return new AsnUnsInteger(parseInteger(value)); <-
original call
return new AsnUnsInteger(parseInteger(value),
SnmpConstants.COUNTER);
} else if (type.hasTag(MibTypeTag.APPLICATION_CATEGORY, 2)) {
// Gauge
//return new AsnUnsInteger(parseInteger(value)); <-
original call
return new AsnUnsInteger(parseInteger(value),
SnmpConstants.GAUGE);
} else if (type.hasTag(MibTypeTag.APPLICATION_CATEGORY, 3)) {
// TimeTicks
// return new AsnUnsInteger(parseInteger(value)); <-
original call
return new AsnUnsInteger(parseInteger(value),
SnmpConstants.TIMETICKS);
...
...
}
Cheers
Paul
_______________________________________________
Mibble-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/mibble-devel