Переглянути джерело

Updated to use HEAD revision of submodules.

Added codedweller namespace, std namespace.
master
Alban Deniz 8 місяці тому
джерело
коміт
7f15bbe0a5

+ 9
- 9
Common/UtilityConfig.cpp Переглянути файл

@@ -423,8 +423,8 @@ void
UtilityConfig::LoadCredentials(void) {
if(0 < CFGData.node_identity.length()) { // If an identity path was provided
ConfigurationData Identity(CFGData.node_identity.c_str()); // then get the data from that file.
ConfigurationElement IdentityReader("snf"); // Create an Identity reader and
codedweller::ConfigurationData Identity(CFGData.node_identity.c_str()); // then get the data from that file.
codedweller::ConfigurationElement IdentityReader("snf"); // Create an Identity reader and
IdentityReader // configure it.
.Element("identity")
.Attribute("licenseid", CFGData.node_licenseid)
@@ -533,13 +533,13 @@ UtilityConfig::GetReportViaXci() {
memset(ResultBuffer, 0, sizeof(ResultBuffer)); // Set the entire thing to nulls.
const int Tries = 20; // How many times to try this.
Sleeper SleepAfterAttempt(100); // How long to sleep between attempts.
codedweller::Sleeper SleepAfterAttempt(100); // How long to sleep between attempts.
const int OpenTries = 90; // How many tries at opening.
Sleeper WaitForOpen(10); // How long to wait for an open cycle.
codedweller::Sleeper WaitForOpen(10); // How long to wait for an open cycle.
const int ReadTries = 900; // How many tries at reading.
Sleeper SleepBeforeReading(10); // How long to pause before reading.
codedweller::Sleeper SleepBeforeReading(10); // How long to pause before reading.
/*
** 20 * 100ms = 2 seconds for all tries.
@@ -553,7 +553,7 @@ UtilityConfig::GetReportViaXci() {
for(int tryagain = Tries; (0<tryagain) && (!ConnectSuccess); tryagain--) { // Try a few times to get this done.
try {
ResultString = ""; // Clear our result string.
TCPHost SNFServer(9001); // Create connection to server.
codedweller::TCPHost SNFServer(9001); // Create connection to server.
SNFServer.makeNonBlocking(); // Make it non-blocking.
for(int tries = OpenTries; 0 < tries; tries--) { // Wait & Watch for a good connection.
@@ -653,7 +653,7 @@ UtilityConfig::GetReportViaLogFile(GetLogFileName GetLogFileNamePtr, int SleepTi
bool IncreasedTimeoutTime = false; // TimeoutTime_msec can be increased
// only once if the log file name changes.
std::string NewLogFileName;
Sleeper Sleep(SleepTime_msec);
codedweller::Sleeper Sleep(SleepTime_msec);
std::string FinalContents;
Sleep();
@@ -737,8 +737,8 @@ UtilityConfig::CheckSnifferStatusReport(std::string StatusReport, std::string Ap
}
ConfigurationElement MyCFGReader("stats"); // Object to parse the XML.
ConfigurationData MyCFGData(StatusReport.c_str(), StatusReport.length()); // Object that contains the XML.
codedweller::ConfigurationElement MyCFGReader("stats"); // Object to parse the XML.
codedweller::ConfigurationData MyCFGData(StatusReport.c_str(), StatusReport.length()); // Object that contains the XML.
std::string PlatformContent;

+ 1
- 1
Common/UtilityConfig.hpp Переглянути файл

@@ -77,7 +77,7 @@ public:
//
// \returns the contents of the <platform> element.
//
string GetPlatformContents(void);
std::string GetPlatformContents(void);
/// Get the workspace path.
//

+ 2
- 2
SNFMilterConfig/SNFMilterConfig.cpp Переглянути файл

@@ -403,9 +403,9 @@ SNFMilterConfig::LoadSocketInfo() {
std::string MilterElement = GetPlatformContents();
ConfigurationData PlatformConfig(MilterElement.c_str(), MilterElement.length());
codedweller::ConfigurationData PlatformConfig(MilterElement.c_str(), MilterElement.length());
ConfigurationElement SocketReader("milter");
codedweller::ConfigurationElement SocketReader("milter");
SocketReader
.Element("socket")

Завантаження…
Відмінити
Зберегти