diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index ac3f1ea10f..4417045820 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,29 +1,44 @@ +2006-10-06 Esteban Sanchez + + * pandora.cc, pandora.h: Added getPandoraDebug() to get the debug + flag value. + + * pandora_windows_service.cc: Do not remove the data file if flag + debug is active. + + * bin/PandoraAgent.exe: Updated to new changes. + + * ChangeLog: Style correction. + 2006-10-05 Raśl Mateos - * Pandora Windows Agent-1.2 Beta3-Setup.exe: Updated installer to include - Pair Key generation. + * installer/Pandora Windows Agent-1.2 Beta3-Setup.exe: Updated + installer to include Pair Key generation. - * pandora.mpi: New file, installjammer installer. You should change PATHS - to include the files into the installer. + * installer/pandora.mpi: New file, installjammer installer. You should + change PATHS to include the files into the installer. - * pandora.ico: New file, used in the installer. + * installer/pandora.ico: New file, used in the installer. - * logo.gif: New file, used in the installer (it should be changed to .png) + * installer/logo.gif: New file, used in the installer (it should be + changed to .png) 2006-09-27 Raśl Mateos - * Pandora Windows Agent-1.2 Beta3-Setup.exe: Updated logo image and added - shortcut to edit configuration file. + * installer/Pandora Windows Agent-1.2 Beta3-Setup.exe: Updated logo + image and added shortcut to edit configuration file. 2006-09-22 Raśl Mateos - * installer/: New directory to put the Pandora Agent for Windows installer + * installer/: New directory to put the Pandora Agent for Windows + installer. - * Pandora Windows Agent-1.2 Beta3-Setup.exe: New file added to repository + * Pandora Windows Agent-1.2 Beta3-Setup.exe: New file added to + repository. -2006-09-20 Raul Mateos +2006-09-22 Raul Mateos - * win32\bin\pandora_agent.conf: Updated some texts to english + * win32\bin\pandora_agent.conf: Updated some texts to english. * win32\bin\README: Added diff --git a/pandora_agents/win32/bin/PandoraAgent.exe b/pandora_agents/win32/bin/PandoraAgent.exe index bd28ef0dcc..37959d1ed8 100755 Binary files a/pandora_agents/win32/bin/PandoraAgent.exe and b/pandora_agents/win32/bin/PandoraAgent.exe differ diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fd06eb74e8..eb4a7516c0 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -239,10 +239,11 @@ Pandora::getPandoraInstallPath () { /** * Set the debug flag. * - * If the flag is false output wil be generated. + * If the flag is true output wil be generated and XML files will not be deleted. * * @param dbg Turns the debug flag on/off. * + * @see getPandoraDebug * @see pandoraDebug */ void @@ -250,6 +251,20 @@ Pandora::setPandoraDebug (bool dbg) { pandora_debug = dbg; } +/** + * Get the debug flag value. + * + * If the flag is truee output wil be generated and XML files will not be deleted. + * + * @see setPandoraDebug + * @see pandoraDebug + */ +bool +Pandora::getPandoraDebug () { + return pandora_debug; +} + + /** * Get the version of the agent. * diff --git a/pandora_agents/win32/pandora.h b/pandora_agents/win32/pandora.h index f918b9ec8c..3143e77280 100644 --- a/pandora_agents/win32/pandora.h +++ b/pandora_agents/win32/pandora.h @@ -57,6 +57,7 @@ namespace Pandora { void setPandoraInstallPath (string path); string getPandoraInstallPath (); void setPandoraDebug (bool dbg); + bool getPandoraDebug (); string getPandoraAgentVersion (); void pandoraDebug (char *format, ...); diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index 0fc333afe3..d4b5c7c942 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -234,19 +234,23 @@ Pandora_Windows_Service::pandora_run () { delete ssh_client; pandoraLog ("Pandora Agent: Authentication Failed when connecting to %s", remote_host.c_str ()); - try { - Pandora_File::removeFile (tmp_filepath); - } catch (Pandora_File::Delete_Error e) { - } + if (getPandoraDebug () == false) { + try { + Pandora_File::removeFile (tmp_filepath); + } catch (Pandora_File::Delete_Error e) { + } + } return; } catch (Pandora_Exception e) { delete ssh_client; pandoraLog ("Pandora Agent: Failed when copying to %s", remote_host.c_str ()); - try { - Pandora_File::removeFile (tmp_filepath); - } catch (Pandora_File::Delete_Error e) { - } + if (getPandoraDebug () == false) { + try { + Pandora_File::removeFile (tmp_filepath); + } catch (Pandora_File::Delete_Error e) { + } + } return; } @@ -266,20 +270,24 @@ Pandora_Windows_Service::pandora_run () { tmp_filename.c_str ()); ssh_client->disconnect(); delete ssh_client; - try { - Pandora_File::removeFile (tmp_filepath); - } catch (Pandora_File::Delete_Error e) { - } + if (getPandoraDebug () == false) { + try { + Pandora_File::removeFile (tmp_filepath); + } catch (Pandora_File::Delete_Error e) { + } + } return; } ssh_client->disconnect(); delete ssh_client; - try { - Pandora_File::removeFile (tmp_filepath); - } catch (Pandora_File::Delete_Error e) { - } + if (getPandoraDebug () == false) { + try { + Pandora_File::removeFile (tmp_filepath); + } catch (Pandora_File::Delete_Error e) { + } + } pandoraDebug ("Execution number %d", execution_number);