2013-02-18 Miguel de Dios <miguel.dedios@artica.es>

* util/pandora_xml_stress.pl: fixed the output the string module
	data in the XML.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7672 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-18 16:24:39 +00:00
parent 87358525d4
commit 0fedf42ef7
2 changed files with 25 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2013-02-18 Miguel de Dios <miguel.dedios@artica.es>
* util/pandora_xml_stress.pl: fixed the output the string module
data in the XML.
2013-02-18 Sergio Martin <sergio.martin@artica.es> 2013-02-18 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm * lib/PandoraFMS/Core.pm

View File

@ -213,14 +213,15 @@ sub generate_xml_files ($$$$$$) {
$rnd_data = generate_curve_data ($utimestamp, $module_min, $module_max, $rnd_data = generate_curve_data ($utimestamp, $module_min, $module_max,
$module_time_wave_length, $module_time_offset); $module_time_wave_length, $module_time_offset);
} }
}elsif ($generation_type eq 'SOURCE') { }
$rnd_data = generate_data_from_source($module_name, $module_src, \%modules_src_pointers); elsif ($generation_type eq 'SOURCE') {
$rnd_data = generate_data_from_source($module_name, $module_src, \%modules_src_pointers);
} }
# Save previous data # Save previous data
$module->{'module_data'} = $rnd_data; $module->{'module_data'} = $rnd_data;
$xml_data .= "\t\t<data>$rnd_data</data>\n"; $xml_data .= "\t\t<data><![CDATA[$rnd_data]]></data>\n";
$xml_data .= "\t</module>\n"; $xml_data .= "\t</module>\n";
} }
@ -319,7 +320,7 @@ sub generate_scatter_data ($$$$$$) {
# And check the probability now # And check the probability now
my $other_rnd = int rand(100); my $other_rnd = int rand(100);
if ( $prob >= $other_rnd) { if ($prob >= $other_rnd) {
return int (rand ($max - $min + 1) + $min); return int (rand ($max - $min + 1) + $min);
} }
else { else {
@ -352,7 +353,8 @@ sub generate_data_from_source ($$$) {
$data = $data_array[$pointer]; $data = $data_array[$pointer];
} else { }
else {
#There was an error, set last to 0 and return data #There was an error, set last to 0 and return data
return $data; return $data;
} }