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:
parent
87358525d4
commit
0fedf42ef7
|
@ -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>
|
||||
|
||||
* lib/PandoraFMS/Core.pm
|
||||
|
|
|
@ -213,14 +213,15 @@ sub generate_xml_files ($$$$$$) {
|
|||
$rnd_data = generate_curve_data ($utimestamp, $module_min, $module_max,
|
||||
$module_time_wave_length, $module_time_offset);
|
||||
}
|
||||
}elsif ($generation_type eq 'SOURCE') {
|
||||
}
|
||||
elsif ($generation_type eq 'SOURCE') {
|
||||
$rnd_data = generate_data_from_source($module_name, $module_src, \%modules_src_pointers);
|
||||
|
||||
}
|
||||
|
||||
# Save previous 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";
|
||||
}
|
||||
|
||||
|
@ -319,7 +320,7 @@ sub generate_scatter_data ($$$$$$) {
|
|||
# And check the probability now
|
||||
my $other_rnd = int rand(100);
|
||||
|
||||
if ( $prob >= $other_rnd) {
|
||||
if ($prob >= $other_rnd) {
|
||||
return int (rand ($max - $min + 1) + $min);
|
||||
}
|
||||
else {
|
||||
|
@ -352,7 +353,8 @@ sub generate_data_from_source ($$$) {
|
|||
|
||||
$data = $data_array[$pointer];
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
#There was an error, set last to 0 and return data
|
||||
return $data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue