/trunk/SNFMilter.cpp
104,7 → 104,12
string NewConfiguration = myRulebase->PlatformConfiguration(); // Get the latest configuration.
if(0 != RunningConfiguration.compare(NewConfiguration)) { // If it does not match, read it!
RunningConfiguration = NewConfiguration; // Capture the latest.
for(int i = 1; i < ResultCodesCount; i++) ResultActions[i] = NoAction; // Init Result/Action config.
for(int i = 1; i < ResultCodesCount; i++) { // Init Result/Action config.
if ( (i >= MinErrorResultCode) && (i <= MaxErrorResultCode) )
ResultActions[i] = Error;
else
ResultActions[i] = NoAction;
}
ResultActions[0] = Allow;
NonZeroAction = NoAction; // NoAction if no configuration for
// non-zero result.
/trunk/SNFMilter.hpp
56,7 → 56,9
const string TCPMilterSocketMnemonic = "1";
const string UNIXMilterSocketMnemonic = "2";
 
const int ResultCodesCount = 64; // Number of valid result codes.
const int ResultCodesCount = 256; // Number of valid result codes.
const int MinErrorResultCode = 64; // Minimum result code for Error action.
const int MaxErrorResultCode = 99; // Maximum result code for Error action.
const int ConfigurationLifetime = 1000; // Config life time in ms.
const bool PrependLocalReceivedHeader = true; // True to prepend local received headers
// to the buffer to scan.