diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index fe6e873a22..dd40ab43d1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.728-181112 +Version: 7.0NG.728-181113 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index fbb6748c0d..5405c2e93e 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.728-181112" +pandora_version="7.0NG.728-181113" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5971ea884b..aba0856a7a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.728'; -use constant AGENT_BUILD => '181112'; +use constant AGENT_BUILD => '181113'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 32ed9e7f75..42a174a880 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.728 -%define release 181112 +%define release 181113 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2b0c71bf6c..d4f8aad316 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.728 -%define release 181112 +%define release 181113 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 1faeaf607e..5bad6fa1cf 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.728" -PI_BUILD="181112" +PI_BUILD="181113" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8adf396df1..92ffc7a8c6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{181112} +{181113} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 33daa693bd..9b4848fb00 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.728(Build 181112)") +#define PANDORA_VERSION ("7.0NG.728(Build 181113)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9f9b037c4c..eb3eccc555 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.728(Build 181112))" + VALUE "ProductVersion", "(7.0NG.728(Build 181113))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3e71004ea0..d47d93efa2 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.728-181112 +Version: 7.0NG.728-181113 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index fcaa0249ce..c5c6cbdf7c 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.728-181112" +pandora_version="7.0NG.728-181113" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 36b67da66f..5f364389ed 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1943,7 +1943,7 @@ switch ($tab) { var aget_id_os = ''; - if('' != $('#text-name').val() && + if('' != $('#text-name').val() && '' == 19){ event.preventDefault(); @@ -1977,7 +1977,7 @@ switch ($tab) { var module_type_snmp = ''; - if('' != $('#text-name').val() && ( + if('' != $('#text-name').val() && ( module_type_snmp == 15 || module_type_snmp == 16 || module_type_snmp == 17 || module_type_snmp == 18)){ event.preventDefault(); diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index d215485694..28b6ec96a5 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -735,7 +735,6 @@ $(document).ready (function () { } else { $('#user_configuration_table-metaconsole_agents_manager').hide(); - $('#user_configuration_table-metaconsole_assigned_server').show(); $('#user_configuration_table-metaconsole_access_node').hide(); } }); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index af4db516fb..7cf500786e 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC181112'; +$build_version = 'PC181113'; $pandora_version = 'v7.0NG.728'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index a27d7d2ec2..31f65447d1 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -495,17 +495,13 @@ function filemanager_file_explorer($real_directory, $relative_directory, if ($homedir_filemanager === false) { $homedir_filemanager = $config['homedir']; - unset($config['homedir_filemanager']); - config_update_value('homedir_filemanager', - $homedir_filemanager); } - else { - $config['homedir_filemanager'] = $homedir_filemanager; - - } - - - + unset($config['homedir_filemanager']); + config_update_value( + 'homedir_filemanager', + $homedir_filemanager + ); + $hack_metaconsole = ''; if (defined('METACONSOLE')) $hack_metaconsole = '../../'; @@ -743,11 +739,11 @@ function filemanager_file_explorer($real_directory, $relative_directory, //Actions buttons //Delete button $data[4] = ''; - $data[4] .= ''; + $data[4] .= ''; $typefile = array_pop(explode(".",$fileinfo['name'])); if (is_writable ($fileinfo['realpath']) && (! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3)) { - $data[4] .= '
'; + $data[4] .= ''; $data[4] .= ''; $data[4] .= html_print_input_hidden ('filename', $fileinfo['realpath'], true); $data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index e31946894f..cc993331ec 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -4387,7 +4387,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) { $data_agents[$agent_id]['children'][$module_group_id]['children'][] = $data_module; unset($modules[$module_id]); } - function order_module_group_keys ($value, $key) { + function order_module_group_keys ($value) { $value['children'] = array_merge($value['children']); return $value; } diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 7e84b167d8..bfc5d3af55 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -1701,7 +1701,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0 || !in_array($group['parent'], $groups))) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; @@ -1713,7 +1713,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { else if ($parent && isset($group['parent']) && $group['parent'] == $parent) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; diff --git a/pandora_console/install.php b/pandora_console/install.php index a6352aae45..31b94c1e1e 100755 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
new; $TaskSem = Thread::Semaphore->new (0); $AgentSem = Thread::Semaphore->new (1); - $ModuleSem = Thread::Semaphore->new (1); # Call the constructor of the parent class my $self = $class->SUPER::new($config, DATASERVER, \&PandoraFMS::DataServer::data_producer, \&PandoraFMS::DataServer::data_consumer, $dbh); @@ -677,7 +675,6 @@ sub process_module_data ($$$$$$$$$$) { $module_conf->{'module_macros'} = '' unless defined ($module_conf->{'module_macros'}); # Get module data or create it if it does not exist - $ModuleSem->down (); my $module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente = ? AND ' . db_text ('nombre') . ' = ?', $agent->{'id_agente'}, safe_input($module_name)); if (! defined ($module)) { @@ -685,14 +682,12 @@ sub process_module_data ($$$$$$$$$$) { # Do not auto create modules #if ($pa_config->{'autocreate'} ne '1') { # logger($pa_config, "Module '$module_name' not found for agent '$agent_name' and module auto-creation disabled.", 10); - # $ModuleSem->up (); # return; #} # Is the agent not learning? if (($agent->{'modo'} == 0) && !($force_processing)) { logger($pa_config, "Learning mode disabled. Skipping module '$module_name' agent '$agent_name'.", 10); - $ModuleSem->up (); return; } @@ -700,7 +695,6 @@ sub process_module_data ($$$$$$$$$$) { $module_conf->{'id_tipo_modulo'} = get_module_id ($dbh, $module_type); if ($module_conf->{'id_tipo_modulo'} <= 0) { logger($pa_config, "Invalid module type '$module_type' for module '$module_name' agent '$agent_name'.", 3); - $ModuleSem->up (); return; } @@ -758,7 +752,6 @@ sub process_module_data ($$$$$$$$$$) { $module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente = ? AND ' . db_text('nombre') . ' = ?', $agent->{'id_agente'}, safe_input($module_name)); if (! defined ($module)) { logger($pa_config, "Could not create module '$module_name' for agent '$agent_name'.", 3); - $ModuleSem->up (); return; } @@ -816,8 +809,6 @@ sub process_module_data ($$$$$$$$$$) { update_module_configuration ($pa_config, $dbh, $module, $module_conf); } - $ModuleSem->up (); - # Module disabled! if ($module->{'disabled'} eq '1') { logger($pa_config, "Skipping disabled module '$module_name' agent '$agent_name'.", 10); diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index acd90970d1..f657eed5d1 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -32,7 +32,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.728"; -my $pandora_build = "181112"; +my $pandora_build = "181113"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c4f79d0a26..ceab85ccc2 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.728 -%define release 181112 +%define release 181113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b16c35b798..3be4505a8c 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.728 -%define release 181112 +%define release 181113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 1bc1cd2dc6..8402a2c461 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.728" -PI_BUILD="181112" +PI_BUILD="181113" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0981047598..7a8a957dd6 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.728 PS181112"; +my $version = "7.0NG.728 PS181113"; # Pandora server configuration my %conf; @@ -297,7 +297,9 @@ sub pandora_purgedb ($$) { my $buffer = 1000; my $id_module = $module->{'id_agente_modulo'}; - + + db_do ($dbh, 'UPDATE tagente_modulo SET parent_module_id=0 WHERE parent_module_id=?', $id_module); + log_message ('', "."); while(1) { diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 173c9f1248..5f35b6a2b3 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.728 PS181112"; +my $version = "7.0NG.728 PS181113"; # save program name for logging my $progname = basename($0);