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 <aa7133@att.com>
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 @@
// 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);