Skip to content

Commit

Permalink
update break
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Nov 10, 2023
1 parent 04de385 commit 861f198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tmx/TmxUtils/src/SNMPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace tmx::utils
: ip_(ip), port_(port), community_(community), snmp_version_(snmp_version), timeout_(timeout)
{

PLOG(logDEBUG1) << "Starting SNMP Client. Target device IP address: " << ip_<< "Target device SNMP port: " << port_;
PLOG(logDEBUG1) << "Starting SNMP Client. Target device IP address: " << ip_<< ", Target device SNMP port: " << port_;

// Bring the IP address and port of the target SNMP device in the required form, which is "IPADDRESS:PORT":
std::string ip_port_string = ip_ + ":" + std::to_string(port_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ namespace RSUHealthMonitor
PLOG(logINFO) << "SNMP RSU status call for field:" << config.field << ", OID: " << config.oid;
snmp_response_obj responseVal;
auto success = _snmpClientPtr->process_snmp_request(config.oid, request_type::GET, responseVal);
if (!success && config.required)
if (!success && config.required){
PLOG(logERROR) << "SNMP session stopped as the required field: " << config.field << " failed! Return empty RSU status!";
return Json::nullValue;
}

if (success && responseVal.type == snmp_response_obj::response_type::INTEGER)
{
Expand Down

0 comments on commit 861f198

Please sign in to comment.