From 53a91c6d877765655acacf30623d8a768d56307d Mon Sep 17 00:00:00 2001 From: dev Date: Wed, 24 Jul 2024 18:49:50 -0400 Subject: [PATCH] Updates --- src/tmx/TmxUtils/src/SNMPClient.cpp | 4 ++-- src/tmx/TmxUtils/src/SNMPClient.h | 4 ++-- src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tmx/TmxUtils/src/SNMPClient.cpp b/src/tmx/TmxUtils/src/SNMPClient.cpp index 17fd45ff7..1cbb53853 100644 --- a/src/tmx/TmxUtils/src/SNMPClient.cpp +++ b/src/tmx/TmxUtils/src/SNMPClient.cpp @@ -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 @@ -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; } diff --git a/src/tmx/TmxUtils/src/SNMPClient.h b/src/tmx/TmxUtils/src/SNMPClient.h index 36debe609..f36646a53 100644 --- a/src/tmx/TmxUtils/src/SNMPClient.h +++ b/src/tmx/TmxUtils/src/SNMPClient.h @@ -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. diff --git a/src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp b/src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp index 2c4663746..0e8773629 100644 --- a/src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp +++ b/src/v2i-hub/SpatPlugin/src/NTCIP1202.cpp @@ -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;