X-Git-Url: https://git.stg.codes/ssmd.git/blobdiff_plain/ae26516a8828d54ab7c0e0bca92031a54a15ed62..3c47eb51fb0eddb876f5b10bd33a4f2bedc3ee87:/src/snmptable.cpp?ds=inline diff --git a/src/snmptable.cpp b/src/snmptable.cpp index b0aaba3..5937270 100644 --- a/src/snmptable.cpp +++ b/src/snmptable.cpp @@ -11,8 +11,8 @@ SNMPTable::SNMPTable(Snmp & snmp, Vb vb(oid); Pdu pdu(&vb, 1); while (true) { - if (snmp.get_next(pdu, target) != SNMP_CLASS_SUCCESS) { - logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "')" << std::endl; + if (int c = snmp.get_next(pdu, target) != 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; } if (pdu.get_vb(0).get_oid().nCompare(oid.len(), oid) != 0) {