#include "snmptable.h"
#include "logger.h"
-using GTS::SNMPTable;
+using SSMD::SNMPTable;
SNMPTable::SNMPTable(Snmp & snmp,
const CTarget & target,
Vb vb(oid);
Pdu pdu(&vb, 1);
while (true) {
- if (int c = snmp.get_next(pdu, target) != SNMP_CLASS_SUCCESS) {
+ 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;
return;
}