From b55bc175615aa4a23430219c0df8d65934fe6a4e Mon Sep 17 00:00:00 2001 From: dhirajverma Date: Tue, 9 Nov 2021 02:15:08 -0500 Subject: [PATCH] FCA_RIC-2909 Change-Id: I8ca78aa929b9ba2f96acd16a413dc2b15b8c1889 Signed-off-by: dhirajverma --- RIC-E2-TERMINATION/ReadConfigFile.h | 2 +- RIC-E2-TERMINATION/sctpThread.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RIC-E2-TERMINATION/ReadConfigFile.h b/RIC-E2-TERMINATION/ReadConfigFile.h index 6f6f094..87e511d 100644 --- a/RIC-E2-TERMINATION/ReadConfigFile.h +++ b/RIC-E2-TERMINATION/ReadConfigFile.h @@ -148,7 +148,7 @@ private: return str; } - inline static std::string& trim(basic_string str, const std::string& chars = "\t\n\v\f\r ") { + inline static std::string& trim(std::string str, const std::string& chars = "\t\n\v\f\r ") { return ltrim(rtrim(str, chars), chars); } }; diff --git a/RIC-E2-TERMINATION/sctpThread.cpp b/RIC-E2-TERMINATION/sctpThread.cpp index 1306c11..55f9083 100644 --- a/RIC-E2-TERMINATION/sctpThread.cpp +++ b/RIC-E2-TERMINATION/sctpThread.cpp @@ -836,6 +836,10 @@ void listener(sctp_params_t *params) { continue; } mdclog_write(MDCLOG_ERR, "Epoll wait failed, errno = %s", strerror(errno)); + if(events) + { + free(events); + } return; #endif } @@ -2885,7 +2889,7 @@ int receiveXappMessages(Sctp_Map_t *sctpMap, } else if (rmrMessageBuffer.rcvMessage->state != 0) { mdclog_write(MDCLOG_ERR, "Failed to send RIC_HEALTH_CHECK_RESP, on RMR state = %d ( %s)", rmrMessageBuffer.rcvMessage->state, translateRmrErrorMessages(rmrMessageBuffer.rcvMessage->state).c_str()); - } else if (loglevel >= MDCLOG_DEBUG && ++counter % 100 == 0) { + } else if (loglevel >= MDCLOG_DEBUG && (++counter % 100 == 0)) { mdclog_write(MDCLOG_DEBUG, "Got %d RIC_HEALTH_CHECK_REQ Request send : OK", counter); } -- 2.16.6