From a3ac3bb0d87423dab13cf0050f8d5a215cb4d3ec Mon Sep 17 00:00:00 2001 From: ramonn Date: Thu, 26 Jun 2014 10:11:47 +0000 Subject: [PATCH] 2014-06-26 Ramon Novoa * util/pandora_xml_stress.pl: Remove new line and carriage return characters when parsing the configuration file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10290 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/pandora_xml_stress.pl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e0d74bfad7..44089b43fe 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2014-06-26 Ramon Novoa + + * util/pandora_xml_stress.pl: Remove new line and carriage return + characters when parsing the configuration file. + 2014-06-24 Ramon Novoa * util/recon_scripts/snmp-recon.pl: Improved host connection. diff --git a/pandora_server/util/pandora_xml_stress.pl b/pandora_server/util/pandora_xml_stress.pl index 849b1c331b..262bf53650 100755 --- a/pandora_server/util/pandora_xml_stress.pl +++ b/pandora_server/util/pandora_xml_stress.pl @@ -47,7 +47,8 @@ sub load_config ($\%\@) { open (FILE, "<", $conf_file) || die ("[error] Could not open configuration file '$conf_file': $!.\n\n"); while (my $line = ) { - + $line =~ s/[\r\n]+//g; + # A module definition if ($line =~ m/module_begin/) { my %module; @@ -56,6 +57,7 @@ sub load_config ($\%\@) { next if ($line =~ m/^#/); while (my $line = ) { + $line =~ s/[\r\n]+//g; # A comment next if ($line =~ m/^#/);