瀏覽代碼

Minor tweaks to eliminate compiler warnings in SNFMulti.*.

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@10 dc71a809-1921-45c4-985c-09c81d0142d9
wx
madscientist 15 年之前
父節點
當前提交
6ba9690b26
共有 3 個文件被更改,包括 17 次插入12 次删除
  1. 15
    10
      SNFMulti.cpp
  2. 1
    1
      SNFMulti.hpp
  3. 1
    1
      snfLOGmgr.hpp

+ 15
- 10
SNFMulti.cpp 查看文件

@@ -211,11 +211,11 @@ void snf_Reloader::myTask() {
const ThreadType snf_Reloader::Type("snf_Reloader"); // The thread's type.

snf_Reloader::snf_Reloader(snf_RulebaseHandler& R) : // When we are created, we
Thread(snf_Reloader::Type, "Reloader"), // brand and name our thread,
RulebaseGetterIsTurnedOn(false), // rulebase getter is off at first,
RulebaseGetter("RulebaseGetter"), // setup our ScriptCaller thread,
MyRulebase(R), // capture the rulebase handler.
TimeToStop(false) { // It's not time to stop yet.
Thread(snf_Reloader::Type, "Reloader"), // brand and name our thread.
MyRulebase(R), // Capture the rulebase handler.
TimeToStop(false), // It's not time to stop yet.
RulebaseGetter("RulebaseGetter"), // Setup our ScriptCaller thread.
RulebaseGetterIsTurnedOn(false) { // Rulebase getter is off at first.
captureFileStats(); // Set up the initial stats.
captureGetterConfig(); // Set up RulebaseGetter config.
run(); // Run our maintenenace thread.
@@ -285,9 +285,9 @@ string FileUTC(string FileName) {
struct tm FileNameTime; // Allocate a time structure.
FileNameTime = *(gmtime(&FileNameStat.st_mtime)); // Copy the file time to it as UTC.

char TimestampBfr[20]; // Timestamp buffer.
char TimestampBfr[20]; // Timestamp buffer.

sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d\0", // Format yyyymmddhhmmss
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
FileNameTime.tm_year+1900,
FileNameTime.tm_mon+1,
FileNameTime.tm_mday,
@@ -587,7 +587,7 @@ void snf_RulebaseHandler::grab(snfCFGPacket& CP) {

void snf_RulebaseHandler::drop(snfCFGPacket& CP) { // Deactiveate this Rulebase.
const TokenMatrix* t = CP.MyTokenMatrix; // Grab the token matrix pointer.
CP.MyCFGData == NULL; // Null the configuration pointer.
CP.MyCFGData = NULL; // Null the configuration pointer.
ScopeMutex HoldStillPlease(MyMutex); // Lock the rulebase until we're done.
if(t==Rulebase) { // If we're dropping the current rulebase
CurrentCount--; // then reduce the current count.
@@ -1019,7 +1019,7 @@ int snf_EngineHandler::scanMessageFile(
// *nix like systems if the software and/or scripting involved isn't
// quite up to spec. We are reading a file, after all.

int ipt = 0; // Insert search point.
unsigned int ipt = 0; // Insert search point.

if(MessageBuffer.size() != MyScanData.ScanSize) { // If our scanner skipped data at
ipt = MessageBuffer.size() - MyScanData.ScanSize; // the top of the message buffer then
@@ -1715,7 +1715,7 @@ int snf_EngineHandler::scanMessage(
break; // That's all.
}

case New: {
case New: {
break;
}

@@ -1785,6 +1785,11 @@ int snf_EngineHandler::scanMessage(
}
}
break;
}
case Unknown: // Unknown - most likely we couldn't
default: { // find a usable source.
break; // Do nothing.
}
}
} // End of IP source depended work (GBUdbOverrides)

+ 1
- 1
SNFMulti.hpp 查看文件

@@ -223,13 +223,13 @@ class snf_RulebaseHandler {

snf_RulebaseHandler(): // Initialization is straight forward.
MyReloader(0),
MyGeneration(0),
ReferenceCount(0),
Rulebase(NULL),
CurrentCount(0),
OldRulebase(NULL),
RetiringCount(0),
RefreshInProgress(false),
MyGeneration(0),
myXCIServerCommandHandler(0) {
MyNETmgr.linkLOGmgr(MyLOGmgr); // Link the NET manager to the LOGmgr.
MyNETmgr.linkGBUdbmgr(MyGBUdbmgr); // Link the NET manager to the GBUdbmgr.

+ 1
- 1
snfLOGmgr.hpp 查看文件

@@ -210,7 +210,7 @@ class snfScanData {

bool MessageFileTypeCGPOn; // Expect a CGP type message file.

int ScanSize; // What size is the scan request.
unsigned int ScanSize; // What size is the scan request.

// GBUdb Activity Flags


Loading…
取消
儲存