Fixed error of manage data in synthetic call

This commit is contained in:
m-lopez-f 2015-12-23 16:27:08 +01:00
parent 9bded74780
commit 2ac55ccdb7
1 changed files with 11 additions and 0 deletions

View File

@ -3203,6 +3203,14 @@ sub cli_create_synthetic() {
print("[ERROR] Type of syntethic module doesn't exists \n\n"); print("[ERROR] Type of syntethic module doesn't exists \n\n");
exit 1; exit 1;
} }
if (scalar(@{$module_data}) == 0) {
print("[ERROR] No modules data \n\n");
exit 1;
}
if ($name_module == '') {
print("[ERROR] No module name \n\n");
exit 1;
}
$module->{'custom_integer_1'} = 0; $module->{'custom_integer_1'} = 0;
$module->{'custom_integer_2'} = 0; $module->{'custom_integer_2'} = 0;
@ -3219,6 +3227,9 @@ sub cli_create_synthetic() {
print("[ERROR] With this type: $synthetic_type only be allow use this operator: 'x' \n\n"); print("[ERROR] With this type: $synthetic_type only be allow use this operator: 'x' \n\n");
exit 1; exit 1;
} }
if (is_numeric(@split_data[1]) == 0) {
continue;
}
@data_module = ("",@split_data[0],@split_data[1]); @data_module = ("",@split_data[0],@split_data[1]);
my $text_data = join(',',@data_module); my $text_data = join(',',@data_module);
push (@filterdata,$text_data); push (@filterdata,$text_data);