2011-09-26 Dario Rodriguez <dario.rodriguez@artica.es>

* pandora_windows_service.cc: Fixed a problem sending XML with broker
	mode enabled (the "master" agent didn't report).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2011-09-26 17:25:53 +00:00
parent e9be7ec4b3
commit 8791afb503
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2011-09-26 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_windows_service.cc: Fixed a problem sending XML with broker
mode enabled (the "master" agent didn't report).
2011-09-26 Sancho Lerena <slerena@artica.es>
* unix/pandora_agent_installer,

View File

@ -1288,6 +1288,7 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) {
/* Generate temporal filename */
random_integer = inttostr (rand());
tmp_filename = conf->getValue ("agent_name");
if (tmp_filename == "") {
tmp_filename = Pandora_Windows_Info::getSystemName ();
}
@ -1430,6 +1431,7 @@ this->elapsed_transfer_time += this->interval;
if (this->elapsed_transfer_time >= this->transfer_interval) {
this->elapsed_transfer_time = 0;
if (!server_addr.empty ()) {
this->sendXml (this->modules);
}
}
@ -1447,6 +1449,8 @@ Pandora_Windows_Service::pandora_run () {
pandoraDebug ("Run begin");
pandora_init();
conf = this->getConf ();
/* Sleep if a startup delay was specified */
@ -1485,7 +1489,7 @@ Pandora_Windows_Service::pandora_run () {
pandoraDebug ("Run %s", module->getName ().c_str ());
if (module->checkCron () == 1) {
module->run ();
Sleep(10);
Sleep(5);
}
/* Save module data to an environment variable */
@ -1505,6 +1509,7 @@ Pandora_Windows_Service::pandora_run () {
if (this->elapsed_transfer_time >= this->transfer_interval) {
this->elapsed_transfer_time = 0;
if (!server_addr.empty ()) {
this->sendXml (this->modules);
}
}