Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Jul 24, 2024
1 parent 92d6a18 commit 53a91c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/tmx/TmxUtils/src/SNMPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ namespace tmx::utils
return port_;
}

void snmp_client::process_snmp_get_response( snmp_response_obj &val, const snmp_pdu &response) const {
void snmp_client::process_snmp_get_response(snmp_response_obj &val, const snmp_pdu &response) const {
for (auto vars = response.variables; vars; vars = vars->next_variable)
{
// Get value of variable depending on ASN.1 type
Expand All @@ -221,7 +221,7 @@ namespace tmx::utils
}
}

void snmp_client::process_snmp_set_response( snmp_response_obj &val, const std::string &input_oid) const {
void snmp_client::process_snmp_set_response( const snmp_response_obj &val, const std::string &input_oid) const {
if(val.type == snmp_response_obj::response_type::INTEGER){
FILE_LOG(logDEBUG) << "Success in SET for OID: " << input_oid << " Value: " << val.val_int << std::endl;
}
Expand Down
4 changes: 2 additions & 2 deletions src/tmx/TmxUtils/src/SNMPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ namespace tmx::utils
* @param val response object
* @param response pdu
*/
void process_snmp_get_response( snmp_response_obj &val, const snmp_pdu &response) const;
void process_snmp_get_response(snmp_response_obj &val, const snmp_pdu &response) const;
/**
* @brief Helper method for logging successful SNMP set responses
* @param val response object
* @param input_oid OID
*/
void process_snmp_set_response( snmp_response_obj &val, const std::string &input_oid) const;
void process_snmp_set_response( const snmp_response_obj &val, const std::string &input_oid) const;

public:
/** @brief Constructor for Traffic Signal Controller Service client.
Expand Down
6 changes: 3 additions & 3 deletions src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ void Ntcip1202::ToJ2735SPAT(SPAT* spat, unsigned long msEpoch , const std::strin

intersection->name = (DescriptiveName_t *) calloc(1, sizeof(DescriptiveName_t));

intersection->name->size = strlen(intersectionName.c_str());
intersection->name->buf = (uint8_t *) calloc(1, strlen(intersectionName.c_str()));
memcpy(intersection->name->buf, intersectionName.c_str(), strlen(intersectionName.c_str()));
intersection->name->size = intersectionName.length();
intersection->name->buf = (uint8_t *) calloc(1, intersectionName.length());
memcpy(intersection->name->buf, intersectionName.c_str(), intersectionName.length());
intersection->id.id = intersectionId;
intersection->revision = (MsgCount_t) 1;

Expand Down

0 comments on commit 53a91c6

Please sign in to comment.