2008-06-18 Ramon Novoa <rnovoa@artica.es>
* win32/modules/pandora_module_logevent.cc: Fixed execution interval. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@878 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bc41c199ab
commit
b30e175038
|
@ -1,3 +1,7 @@
|
||||||
|
2008-06-18 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* win32/modules/pandora_module_logevent.cc: Fixed execution interval.
|
||||||
|
|
||||||
2008-06-18 Ramon Novoa <rnovoa@artica.es>
|
2008-06-18 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* win32/modules/pandora_module_logevent.cc: Now returns "empty" data
|
* win32/modules/pandora_module_logevent.cc: Now returns "empty" data
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "pandora_module_logevent.h"
|
#include "pandora_module_logevent.h"
|
||||||
#include "../windows/pandora_wmi.h"
|
#include "../windows/pandora_wmi.h"
|
||||||
|
#include "../pandora_windows_service.h"
|
||||||
|
|
||||||
using namespace Pandora;
|
using namespace Pandora;
|
||||||
using namespace Pandora_Modules;
|
using namespace Pandora_Modules;
|
||||||
|
@ -42,9 +43,24 @@ Pandora_Module_Logevent::Pandora_Module_Logevent (string name, string source, st
|
||||||
|
|
||||||
void
|
void
|
||||||
Pandora_Module_Logevent::run () {
|
Pandora_Module_Logevent::run () {
|
||||||
|
int interval, module_interval;
|
||||||
|
string value;
|
||||||
list<string> event_list;
|
list<string> event_list;
|
||||||
list<string>::iterator event;
|
list<string>::iterator event;
|
||||||
|
Pandora_Agent_Conf::Pandora_Agent_Conf *conf;
|
||||||
|
|
||||||
|
conf = Pandora_Agent_Conf::getInstance ();
|
||||||
|
|
||||||
|
// Get execution interval
|
||||||
|
value = conf->getValue ("interval");
|
||||||
|
interval = atoi(value.c_str ());
|
||||||
|
|
||||||
|
module_interval = this->getInterval ();
|
||||||
|
if (module_interval > 0) {
|
||||||
|
interval *= module_interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run
|
||||||
try {
|
try {
|
||||||
Pandora_Module::run ();
|
Pandora_Module::run ();
|
||||||
} catch (Interval_Not_Fulfilled e) {
|
} catch (Interval_Not_Fulfilled e) {
|
||||||
|
@ -53,6 +69,7 @@ Pandora_Module_Logevent::run () {
|
||||||
|
|
||||||
Pandora_Wmi::getEventList (this->source, this->type, this->pattern, this->getInterval (), event_list);
|
Pandora_Wmi::getEventList (this->source, this->type, this->pattern, this->getInterval (), event_list);
|
||||||
|
|
||||||
|
// No data
|
||||||
if (event_list.size () < 1) {
|
if (event_list.size () < 1) {
|
||||||
this->setOutput ("");
|
this->setOutput ("");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue