From 3d80c361ee53560b452b793abf2fd30d8196f3c8 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 24 Dec 2008 12:33:41 +0000 Subject: [PATCH] 2008-12-24 Ramon Novoa * win32/pandora_windows_service.cc: Do not send XML if server address is not set. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1307 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 5 +++++ pandora_agents/win32/pandora_windows_service.cc | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 9b06989f94..707e1ae301 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2008-12-24 Ramon Novoa + + * win32/pandora_windows_service.cc: Do not send XML if server address + is not set. + 2008-12-16 Ramon Novoa * win32/modules/pandora_module_wmiquery.cc, diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index d401f496a9..81dea37209 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -742,11 +742,17 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) { void Pandora_Windows_Service::pandora_run () { + Pandora_Agent_Conf *conf = NULL; + string server_addr; + pandoraDebug ("Run begin"); /* Check for configuration changes */ this->checkConfig (); + conf = this->getConf (); + server_addr = conf->getValue ("server_ip"); + execution_number++; if (this->modules != NULL) { @@ -768,8 +774,9 @@ Pandora_Windows_Service::pandora_run () { if (this->elapsed_transfer_time >= this->transfer_interval) { this->elapsed_transfer_time = 0; - - this->sendXml (this->modules); + if (!server_addr.empty ()) { + this->sendXml (this->modules); + } } /* Get the interval value (in minutes) */