2013-04-11 Ramon Novoa <rnovoa@artica.es>
* pandora_windows_service.cc, pandora_windows_service.h, udp_server/udp_server.cc: Added an option to force the sending of data files. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7964 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c16ca0d90c
commit
e5c83fb81d
|
@ -1,3 +1,10 @@
|
||||||
|
2013-04-11 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandora_windows_service.cc,
|
||||||
|
pandora_windows_service.h,
|
||||||
|
udp_server/udp_server.cc: Added an option to force the sending of
|
||||||
|
data files.
|
||||||
|
|
||||||
2013-04-11 Hirofumi Kosaka <kosaka@rworks.jp>
|
2013-04-11 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||||
|
|
||||||
* pandora_windows_service.cc: Fixed possible resource leaks;
|
* pandora_windows_service.cc: Fixed possible resource leaks;
|
||||||
|
|
|
@ -1740,6 +1740,11 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
|
||||||
|
|
||||||
void
|
void
|
||||||
Pandora_Windows_Service::pandora_run () {
|
Pandora_Windows_Service::pandora_run () {
|
||||||
|
pandora_run (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Pandora_Windows_Service::pandora_run (int forced_run) {
|
||||||
Pandora_Agent_Conf *conf = NULL;
|
Pandora_Agent_Conf *conf = NULL;
|
||||||
string server_addr, conf_file, *all_conf;
|
string server_addr, conf_file, *all_conf;
|
||||||
int startup_delay = 0;
|
int startup_delay = 0;
|
||||||
|
@ -1821,7 +1826,7 @@ Pandora_Windows_Service::pandora_run () {
|
||||||
|
|
||||||
/* Evaluate intensive conditions */
|
/* Evaluate intensive conditions */
|
||||||
intensive_match = module->evaluateIntensiveConditions ();
|
intensive_match = module->evaluateIntensiveConditions ();
|
||||||
if (intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) {
|
if (forced_run != 1 && intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) {
|
||||||
module->setNoOutput ();
|
module->setNoOutput ();
|
||||||
this->modules->goNext ();
|
this->modules->goNext ();
|
||||||
continue;
|
continue;
|
||||||
|
@ -1842,7 +1847,7 @@ Pandora_Windows_Service::pandora_run () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
|
if (forced_run == 1 || data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
|
||||||
|
|
||||||
// Send the XML
|
// Send the XML
|
||||||
if (!server_addr.empty ()) {
|
if (!server_addr.empty ()) {
|
||||||
|
|
|
@ -89,6 +89,7 @@ namespace Pandora {
|
||||||
Pandora_Windows_Service ();
|
Pandora_Windows_Service ();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void pandora_run (int forced_run);
|
||||||
void pandora_run ();
|
void pandora_run ();
|
||||||
void pandora_init ();
|
void pandora_init ();
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ int Pandora::process_command (Pandora_Windows_Service *service, char *command) {
|
||||||
|
|
||||||
/* Re-run */
|
/* Re-run */
|
||||||
if (strcmp (operation, "REFRESH") == 0) {
|
if (strcmp (operation, "REFRESH") == 0) {
|
||||||
service->pandora_run ();
|
service->pandora_run (1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue