From 1f09c533d522d1945353771a67aecc0d9cb021e6 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Mon, 22 Jul 2019 14:12:41 -0500 Subject: [PATCH] more debugging printouts --- procmgr/processmanager.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index 86688ec94..c3835eec3 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -9261,13 +9261,14 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa return returnStatus; } - string fileName = startup::StartUp::installDir() + "/local/dbrmfiles"; - unlink(fileName.c_str()); + //string fileName = startup::StartUp::installDir() + "/local/dbrmfiles"; + //unlink(fileName.c_str()); // this replaces the stuff that's if-0'd below boost::filesystem::path pCurrentDbrmFile(currentDbrmFile + "_"); boost::filesystem::path dbrmDir(pCurrentDbrmFile.parent_path()); log.writeLog(__LINE__, "pCurrentDbrmFile is " + pCurrentDbrmFile.string(), LOG_TYPE_DEBUG); + log.writeLog(__LINE__, "pCurrentDbrmFile.filename() is " + pCurrentDbrmFile.filename().string(), LOG_TYPE_DEBUG); log.writeLog(__LINE__, "dbrmDir is " + dbrmDir.string(), LOG_TYPE_DEBUG); list fileListing; vector dbrmFiles; @@ -9278,8 +9279,12 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa // put file in dbrmFiles if it contains the right prefix and is not empty if (file.find(pCurrentDbrmFile.filename().string()) == 0) log.writeLog(__LINE__, "this one should go in the set", LOG_TYPE_DEBUG); - if (fs.size((dbrmDir / file).string().c_str()) != 0) - log.writeLog(__LINE__, "FS says size = 0", LOG_TYPE_DEBUG); + else + log.writeLog(__LINE__, "didn't pass the prefix test", LOG_TYPE_DEBUG); + if (fs.size((dbrmDir / file).string().c_str()) == 0) + log.writeLog(__LINE__, "FS says " + (dbrmDir / file).string() + " size = 0", LOG_TYPE_DEBUG); + else + log.writeLog(__LINE__, "FS says " + (dbrmDir / file).string() + " size > 0", LOG_TYPE_DEBUG); if (file.find(pCurrentDbrmFile.filename().string()) == 0 && fs.size((dbrmDir / file).string().c_str()) != 0)