From dfc1db9d2b94d75ff3d28fb2925eb8a0b291aee9 Mon Sep 17 00:00:00 2001 From: "aa7133@att.com" Date: Tue, 31 Mar 2020 17:32:04 +0300 Subject: [PATCH] version 4.0.6 Fix bug on the configuration change by copying the config file. Error in the way of string compere in C++ vs char [] so moved to strcmp Now overwriting the conf/config.conf works properly and not jus by editing Change-Id: I91ca7dcfecec49e62e5fc03d8340271ee037ee3d Signed-off-by: aa7133@att.com --- RIC-E2-TERMINATION/sctpThread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RIC-E2-TERMINATION/sctpThread.cpp b/RIC-E2-TERMINATION/sctpThread.cpp index c5ba229..f46bef8 100644 --- a/RIC-E2-TERMINATION/sctpThread.cpp +++ b/RIC-E2-TERMINATION/sctpThread.cpp @@ -726,12 +726,16 @@ void handleConfigChange(sctp_params_t *sctpParams) { // not the directory } if (event->len) { - if (!(sctpParams->configFileName.compare(event->name))) { + auto retVal = strcmp(sctpParams->configFileName.c_str(), event->name); + if (retVal != 0) { continue; } } // only the file we want if (event->mask & (uint32_t)IN_CLOSE_WRITE) { + if (mdclog_level_get() >= MDCLOG_INFO) { + mdclog_write(MDCLOG_INFO, "Configuration file changed"); + } if (exists(p)) { const int size = 2048; auto fileSize = file_size(p); -- 2.16.6