Kaynağa Gözat

snf_EngineHandler::scanMessageFile updated to read only up to the scan horizon of large files if possible (when header injection is turned off)

snfXCImgr now has 8 processing channels.

Engine Version number changed.


git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@39 dc71a809-1921-45c4-985c-09c81d0142d9
wx
madscientist 12 yıl önce
ebeveyn
işleme
4b87545ba7
3 değiştirilmiş dosya ile 30 ekleme ve 5 silme
  1. 7
    1
      SNFMulti.cpp
  2. 18
    4
      snfXCImgr.cpp
  3. 5
    0
      snfXCImgr.hpp

+ 7
- 1
SNFMulti.cpp Dosyayı Görüntüle

@@ -23,7 +23,7 @@ using namespace std;

//// Version Info

const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.18 Build: " __DATE__ " " __TIME__;
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.19 Build: " __DATE__ " " __TIME__;

//// Script Caller Methods

@@ -982,6 +982,12 @@ int snf_EngineHandler::scanMessageFile(
);
throw FileError("snf_EngineHandler::scanMessageFile() FileEmpty!");
}
boolean NoNeedToReadFullFile = (false == MyScanData.XHeaderInjectOn);
boolean FileSizeLargerThanScanHorizon = (MessageFileSize > snf_ScanHorizon);
if(NoNeedToReadFullFile && FileSizeLargerThanScanHorizon) {
MessageFileSize = snf_ScanHorizon;
}

vector<unsigned char> MessageBuffer; // Allocate a buffer and size
try { MessageBuffer.resize(MessageFileSize, 0); } // it to fit the message.

+ 18
- 4
snfXCImgr.cpp Dosyayı Görüntüle

@@ -585,9 +585,15 @@ snfXCITCPChannel* LowestQueue(snfXCITCPChannel* A, snfXCITCPChannel* B) {
}

snfXCITCPChannel* snfXCImgr::BestAvailableChannel() { // Selects XCI channel w/ lowest queue.
return LowestQueue( // Pick the lowest of the lowest.
LowestQueue(C0, C1),
LowestQueue(C2, C3)
return LowestQueue( // Pick the lowest of the lowest.
LowestQueue(
LowestQueue(C0, C1),
LowestQueue(C2, C3)
),
LowestQueue(
LowestQueue(C4, C5),
LowestQueue(C6, C7)
)
);
}

@@ -613,10 +619,14 @@ void snfXCImgr::startup_XCI() {
ScopeMutex IGotIt(ChannelMutex); // Serialize state control for safety.
if(myHome) { // We need to know our home.
if(CFG_XCI_ON) { // If XCI is configured on, startup!
C0 = new snfXCITCPChannel(myHome, "C0"); // Launch our 4 processing channels.
C0 = new snfXCITCPChannel(myHome, "C0"); // Launch our 8 processing channels.
C1 = new snfXCITCPChannel(myHome, "C1");
C2 = new snfXCITCPChannel(myHome, "C2");
C3 = new snfXCITCPChannel(myHome, "C3");
C4 = new snfXCITCPChannel(myHome, "C4");
C5 = new snfXCITCPChannel(myHome, "C5");
C6 = new snfXCITCPChannel(myHome, "C6");
C7 = new snfXCITCPChannel(myHome, "C7");
startup_Listener(); // Start up our listener.
myHome->logThisInfo("XCI", 0, "Startup"); // Log the startup.
XCI_UP = true; // Set the flag. We're up!
@@ -632,6 +642,10 @@ void snfXCImgr::shutdown_XCI() {
if(C1) { delete C1; C1 = 0; } // If up, take C1 down and NULL it.
if(C2) { delete C2; C2 = 0; } // If up, take C2 down and NULL it.
if(C3) { delete C3; C3 = 0; } // If up, take C3 down and NULL it.
if(C4) { delete C4; C4 = 0; } // If up, take C4 down and NULL it.
if(C5) { delete C5; C5 = 0; } // If up, take C5 down and NULL it.
if(C6) { delete C6; C6 = 0; } // If up, take C6 down and NULL it.
if(C7) { delete C7; C7 = 0; } // If up, take C7 down and NULL it.

myHome->logThisInfo("XCI", 0, "Shutdown"); // Log the shutdown.
XCI_UP = false; // Set the flag. We're down!

+ 5
- 0
snfXCImgr.hpp Dosyayı Görüntüle

@@ -156,6 +156,11 @@ class snfXCImgr : private Thread {
snfXCITCPChannel* C1; // XCI channel 1
snfXCITCPChannel* C2; // XCI channel 2
snfXCITCPChannel* C3; // XCI channel 3
snfXCITCPChannel* C4; // XCI channel 4
snfXCITCPChannel* C5; // XCI channel 5
snfXCITCPChannel* C6; // XCI channel 6
snfXCITCPChannel* C7; // XCI channel 7
snfXCITCPChannel* BestAvailableChannel(); // Selects XCI channel w/ lowest queue.

TCPListener* Listener; // XCI Listener.

Loading…
İptal
Kaydet