From: aa7133@att.com Date: Tue, 31 Mar 2020 14:32:04 +0000 (+0300) Subject: version 4.0.6 X-Git-Tag: 5.4.8~65 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F3079%2F1;p=ric-plt%2Fe2.git 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 --- 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);