Skip to content
Snippets Groups Projects
Commit 674dbb29 authored by pharook's avatar pharook
Browse files

Doplneni #817 - u target_port, attack_scale, priority, timeout prozatim...

Doplneni #817 - u target_port, attack_scale, priority, timeout prozatim dovolujeme i undef - zpetna kompatibilita
parent e16ea7db
No related branches found
No related tags found
No related merge requests found
......@@ -231,11 +231,11 @@ sub saveNewEvent
}
my $change_string = "";
if ($target_port !~ /^\d+\z/) {
if (defined $target_port && $target_port !~ /^\d+\z/) {
$change_string = $change_string . "target_port: '$target_port'";
$target_port = undef;
}
if ($attack_scale !~ /^\d+\z/) {
if (defined $attack_scale && $attack_scale !~ /^\d+\z/) {
if ($change_string eq "") {
$change_string = $change_string . "attack_scale: '$attack_scale'";
} else {
......@@ -243,7 +243,7 @@ sub saveNewEvent
}
$attack_scale = undef;
}
if ($priority !~ /^\d+\z/) {
if (defined $priority && $priority !~ /^\d+\z/) {
if ($change_string eq "") {
$change_string = $change_string . "priority: '$priority'";
} else {
......@@ -251,7 +251,7 @@ sub saveNewEvent
}
$priority = undef;
}
if ($timeout !~ /^\d+\z/) {
if (defined $timeout && $timeout !~ /^\d+\z/) {
if ($change_string eq "") {
$change_string = $change_string . "timeout: '$timeout'";
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment