From f557d0952966f7b8092acddade6c57463791d9d9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 4 Mar 2019 15:01:50 +0100 Subject: [PATCH] discoveryserver change default value (server) and minor fix in subst_column_macros Former-commit-id: ff22af353cf794ae0600a23d61fd30256193d463 --- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/Core.pm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 6e23e63aa2..16f712847d 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -226,7 +226,7 @@ sub pandora_load_config { $pa_config->{"dataserver"} = 1; # default $pa_config->{"networkserver"} = 1; # default $pa_config->{"snmpconsole"} = 1; # default - $pa_config->{"discoveryserver"} = 1; # default + $pa_config->{"discoveryserver"} = 0; # default $pa_config->{"wmiserver"} = 1; # default $pa_config->{"pluginserver"} = 1; # default $pa_config->{"predictionserver"} = 1; # default diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 4155b2d432..0f3e383be8 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3811,7 +3811,10 @@ sub subst_alert_macros ($$;$$$$) { ########################################################################## sub subst_column_macros ($$;$$$$) { my ($string, $macros, $pa_config, $dbh, $agent, $module) = @_; - + + # Avoid to manipulate null strings + return $string unless defined($string); + # Do not attempt to substitute macros unless the string # begins with an underscore. return $string unless substr($string, 0, 1) eq '_';