X-Git-Url: https://git.stg.codes/ssmd.git/blobdiff_plain/0e2bc51f6930b264ca31bb72a6388e80539a85f6..82a6c22158618bc1e7738bf08bf1b305179935dc:/src/snmptable.cpp diff --git a/src/snmptable.cpp b/src/snmptable.cpp index 5937270..e729b05 100644 --- a/src/snmptable.cpp +++ b/src/snmptable.cpp @@ -11,7 +11,11 @@ SNMPTable::SNMPTable(Snmp & snmp, 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; }