2013-02-18 Sergio Martin <sergio.martin@artica.es>

* lib/PandoraFMS/PluginServer.pm: Clean the blank spaces
	from the start and end of the return of the plugin to make
	easier the configuration of numeric modules and not confuse
	with snapshot mode



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7666 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-02-18 10:57:14 +00:00
parent f8e6cf5a5c
commit c73bc7e18d
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2013-02-18 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/PluginServer.pm: Clean the blank spaces
from the start and end of the return of the plugin to make
easier the configuration of numeric modules and not confuse
with snapshot mode
2013-02-15 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm

View File

@ -189,6 +189,11 @@ sub data_consumer ($$) {
eval {
$module_data = `$command`;
};
# Clean blank spaces and carriage return from start and end of the data
$module_data =~ s/^[\s|\n|\r]*//;
$module_data =~ s/[\s|\n|\r]*$//;
my $ReturnCode = ($? >> 8) & 0xff;
if ($plugin->{'plugin_type'} == 1) {