X-Git-Url: https://git.stg.codes/ssmd.git/blobdiff_plain/6b235fa5a6fd3b514febe5b1328f97df14fb10bc..3c47eb51fb0eddb876f5b10bd33a4f2bedc3ee87:/src/switch.cpp diff --git a/src/switch.cpp b/src/switch.cpp index db8a1be..01024a1 100644 --- a/src/switch.cpp +++ b/src/switch.cpp @@ -231,14 +231,17 @@ bool Switch::dropACLsByTable(const CTarget & target, unsigned profileId, const S bool Switch::createACLs(const CTarget & target) { std::vector::const_iterator it; + size_t pos = 0; for (it = _acls.begin(); it != _acls.end(); ++it) { Pdu pdu; it->appendPdu(pdu); if (int c = _snmp.set(pdu, target) != SNMP_CLASS_SUCCESS) { - logger << "Switch::createACLs() - failed to invoke Snmp::set for the switch '" << _ip << "'. Error message: '" << Snmp::error_msg(c) << "'" << std::endl; + logger << "Switch::createACLs() - failed to invoke Snmp::set for the switch '" << _ip << "'. Error message: '" << Snmp::error_msg(c) << "'. Error occured at creation of " << (pos + 1) << " from " << _acls.size() << " ACL's" << std::endl; + logger << "Switch::createACLs() - ACL dump: " << *it << std::endl; return false; } _aclsCreated = true; + ++pos; } return true; }