Pārlūkot izejas kodu

Fixed bug - PlatformVersion was not reported. PlatformVersion is now propagated through the initialization sequence to the scanner pool and ultimately the rulebase so it can be reported properly.

git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@36 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfc
master
madscientist pirms 15 gadiem
vecāks
revīzija
6677ba8387

+ 1
- 1
SNF4CGP/ExecutiveProcess.cpp Parādīt failu

@@ -17,7 +17,7 @@ void ExecutiveProcess::initializeOutput() {
}
void ExecutiveProcess::initializeJobPool() {
Jobs.init(ConfigInfo, Output);
Jobs.init(VersionInfo, ConfigInfo, Output);
}
void ExecutiveProcess::initializeWorkerPool() {

+ 5
- 2
SNF4CGP/JobPool.cpp Parādīt failu

@@ -556,9 +556,12 @@ ScannerPool& JobPool::Scanners() {
// Watch out -- Initializing the JobPool also means starting up SNFMulti and
// the ScannerPool.
void JobPool::init(string Configuration, OutputProcessor& O) { // Initialize the JobPool.
void JobPool::init(
string VersionInfo,
string Configuration,
OutputProcessor& O) {
Output_ = &O;
Scanners().init(Configuration);
Scanners().init(VersionInfo, Configuration);
ScopeMutex Busy(AllocationMutex);
Job* FirstJob = makeJob();
Jobs.give(FirstJob);

+ 4
- 1
SNF4CGP/JobPool.hpp Parādīt failu

@@ -154,7 +154,10 @@ class JobPool {
public:
JobPool(); // Basic construction.
~JobPool(); // Safe cleanup on destruction.
void init(string Configuration, OutputProcessor& O); // Get ready to allocate jobs.
void init( // Get ready to allocate jobs.
const string VersionInfo,
const string Configuration,
OutputProcessor& O);
Job& grab(); // Get a fresh job object.
void drop(Job& J); // Drop a used job object.
void stop(); // Shutdown and clean up.

+ 2
- 1
SNF4CGP/ScannerPool.cpp Parādīt failu

@@ -65,7 +65,8 @@ snf_RulebaseHandler& ScannerPool::Rulebase() {
return (*Rulebase_);
}
void ScannerPool::init(const string Configuration) { // Get ready to provide scanners.
void ScannerPool::init(const string VersionInfo, const string Configuration) { // Get ready to provide scanners.
Rulebase().PlatformVersion(VersionInfo);
Rulebase().open(Configuration.c_str(), "", ""); // Light up the rulebase manager.
ScopeMutex Busy(AllocationControl);
Scanner* FirstScanner = makeScanner(); // Create our first scanner.

+ 1
- 1
SNF4CGP/ScannerPool.hpp Parādīt failu

@@ -55,7 +55,7 @@ class ScannerPool {
public:
ScannerPool(); // Constructed simply.
~ScannerPool(); // Cleans up when destroyed.
void init(const string Configuration); // Get ready to provide scanners.
void init(const string VersionInfo, const string Configuration); // Get ready to provide scanners.
void stop(); // Shutdown and clean up.
Scanner& grab(); // Provides a Scanner from the pool.
void drop(Scanner& S); // Returns a Scanner to the pool.

Notiek ielāde…
Atcelt
Saglabāt