git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@36 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfcmaster
@@ -17,7 +17,7 @@ void ExecutiveProcess::initializeOutput() { | |||
} | |||
void ExecutiveProcess::initializeJobPool() { | |||
Jobs.init(ConfigInfo, Output); | |||
Jobs.init(VersionInfo, ConfigInfo, Output); | |||
} | |||
void ExecutiveProcess::initializeWorkerPool() { |
@@ -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); |
@@ -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. |
@@ -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. |
@@ -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. |