- if (snmp.get_next(pdu, target) != SNMP_CLASS_SUCCESS) {
- logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "')" << std::endl;
+ int c = snmp.get_next(pdu, target);
+ for (size_t i = 0; i < 3 && c != SNMP_CLASS_SUCCESS; ++i) {
+ c = snmp.get_next(pdu, target);
+ }
+ if (c != SNMP_CLASS_SUCCESS) {
+ logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "'). Error message: '" << Snmp::error_msg(c) << "'" << std::endl;