version 4.0.6 79/3079/1
authoraa7133@att.com <aa7133@att.com>
Tue, 31 Mar 2020 14:32:04 +0000 (17:32 +0300)
committeraa7133@att.com <aa7133@att.com>
Tue, 31 Mar 2020 14:32:43 +0000 (17:32 +0300)
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>
RIC-E2-TERMINATION/sctpThread.cpp

index c5ba229..f46bef8 100644 (file)
@@ -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);