From 1b2eff44387f49f68cfc400aa9d4b5185e9f4532 Mon Sep 17 00:00:00 2001 From: Akihiro Uchida Date: Thu, 26 Feb 2015 01:38:28 +0900 Subject: [PATCH] Remember the agent_name_cmd result in xml header --- pandora_agents/win32/pandora_windows_service.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index fe5980e8d4..ef6136a32a 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -370,7 +370,7 @@ Pandora_Windows_Service::launchTentacleProxy() { string Pandora_Windows_Service::getXmlHeader () { char timestamp[20]; - string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name, agent_name_cmd, temp_agent_name; + string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name, agent_name_cmd; string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result; time_t ctime; struct tm *ctime_tm = NULL; @@ -385,7 +385,7 @@ Pandora_Windows_Service::getXmlHeader () { agent_name_cmd = conf->getValue ("agent_name_cmd"); if (agent_name_cmd != "") { agent_name_cmd = "cmd.exe /c \"" + agent_name_cmd + "\""; - temp_agent_name = getCoordinatesFromCmdExec(agent_name_cmd); + static string temp_agent_name = getCoordinatesFromCmdExec(agent_name_cmd); // Delete carriage return if is provided pos = temp_agent_name.find("\n"); if(pos != string::npos) {