Browse Source

Improved code quality for logic that shrinks the message size when header injection is turned off.

Bumped minor revision number.

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@43 dc71a809-1921-45c4-985c-09c81d0142d9
wx
madscientist 12 years ago
parent
commit
b82c1a35c5
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      SNFMulti.cpp

+ 6
- 6
SNFMulti.cpp View File



//// Version Info //// Version Info


const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.21 Build: " __DATE__ " " __TIME__;
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.22 Build: " __DATE__ " " __TIME__;


//// Script Caller Methods //// Script Caller Methods


throw FileError("snf_EngineHandler::scanMessageFile() FileEmpty!"); throw FileError("snf_EngineHandler::scanMessageFile() FileEmpty!");
} }
bool NoNeedToReadFullFile = (false == MyScanData.XHeaderInjectOn);
bool FileSizeLargerThanScanHorizon = (MessageFileSize > snf_ScanHorizon);
if(NoNeedToReadFullFile && FileSizeLargerThanScanHorizon) {
MessageFileSize = snf_ScanHorizon;
bool isXHeaderInjectionOn = (MyScanData.XHeaderInjectOn);
bool isNoNeedToReadFullFile = (false == isXHeaderInjectionOn);
if(isNoNeedToReadFullFile) {
MessageFileSize = min(MessageFileSize, snf_ScanHorizon);
} }


vector<unsigned char> MessageBuffer; // Allocate a buffer and size vector<unsigned char> MessageBuffer; // Allocate a buffer and size


// Inject headers if required. // Inject headers if required.


if(MyScanData.XHeaderInjectOn) { // If we are to inject headers:
if(isXHeaderInjectionOn) { // If we are to inject headers:
const char* XHDRInjStage = "Begin"; // Keep track of what we're doing. const char* XHDRInjStage = "Begin"; // Keep track of what we're doing.
try { try {



Loading…
Cancel
Save