From 094e5b554ac2b7658ee03109999b477c6d5a0808 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Mon, 22 Jul 2019 16:25:31 -0500 Subject: [PATCH] Changed debugging outputs. --- procmgr/processmanager.cpp | 15 +-------------- procmon/processmonitor.cpp | 4 +++- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index d310dd944..437e60400 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -9271,25 +9271,11 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa // 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; fs.listDirectory(dbrmDir.string().c_str(), fileListing); for (const auto &file : fileListing) { - log.writeLog(__LINE__, "fileListing contains " + file, LOG_TYPE_DEBUG); - // 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); - 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) { @@ -9517,6 +9503,7 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa //in >> fdmsg; + log.writeLog(__LINE__, "Sending " + to_string(fdmsg.length()) + " bytes.", LOG_TYPE_DEBUG); try { cfIos.write(fdmsg); diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index 4e5419c4f..61ca2f933 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -22,7 +22,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include @@ -4414,6 +4414,8 @@ int ProcessMonitor::getDBRMdata(string *path) bool journalFile = false; boost::uuids::uuid u = boost::uuids::random_generator()(); bf::path pTmp = bf::path(*path) / boost::uuids::to_string(u); + if (config::Config::makeConfig()->getConfig("Installation", "DBRootStorageType") != "storagemanager") + bf::create_directories(pTmp); *path = pTmp.string(); log.writeLog(__LINE__, "Downloading DBRM files to " + *path, LOG_TYPE_DEBUG);