Просмотр исходного кода

Correctly read configuration line beginning with "snf_result 0".


git-svn-id: https://svn.microneil.com/svn/PKG-SNF-CS-NIX/trunk@50 233e721a-07f6-49eb-a7da-05e0e16828fc
master
adeniz 15 лет назад
Родитель
Сommit
8a88712984
1 измененных файлов: 16 добавлений и 4 удалений
  1. 16
    4
      SNF_CS_Developer_Package/SNF4SA/snf4sa.pm

+ 16
- 4
SNF_CS_Developer_Package/SNF4SA/snf4sa.pm Просмотреть файл

# Sort the SNFServer result codes and remove duplicates. # Sort the SNFServer result codes and remove duplicates.
@snfCode = sort { $a <=> $b } @snfCode; @snfCode = sort { $a <=> $b } @snfCode;
my $prev = -1; my $prev = -1;
my @temp = grep($_ != $prev && ($prev = $_), @snfCode);
my @temp = grep($_ != $prev && (($prev) = $_), @snfCode);
$ret_hash->{snfCode} = \@temp; $ret_hash->{snfCode} = \@temp;
# The $specVal[$lastSpec] is $self->{SA_DeltaScoreKey}. Return if # The $specVal[$lastSpec] is $self->{SA_DeltaScoreKey}. Return if
# Split the specification. # Split the specification.
my @codeVal = split(/-/, $specElement); my @codeVal = split(/-/, $specElement);
#$self->log_debug("snf4sa: get_code_values. specElement: $specElement. codeVal: @codeVal"); # DEBUG
if (1 == @codeVal) { if (1 == @codeVal) {
if ($specElement =~ /^\d+$/) { if ($specElement =~ /^\d+$/) {
$rcx = 'Unknown' unless $rcx; $rcx = 'Unknown' unless $rcx;
my $rch = $SNF_XCI_Return->{"header"}; # the SNF header(s) my $rch = $SNF_XCI_Return->{"header"}; # the SNF header(s)
# DEBUG.
# for (my $i = 0; $i < $permsgstatus->{main}->{conf}->{snfSaMapping}; $i++) {
# if (! defined($permsgstatus->{main}->{conf}->{snfSaMapping}->[$i])) {
# print "No configuration for SNFServer code $i\n";
# next;
# }
# print "SNFServer code: $i, " .
# "deltaScore: " .
# "$permsgstatus->{main}->{conf}->{snfSaMapping}->[$i]->{deltaScore}, " .
# "shortCircuit: " .
# "$permsgstatus->{main}->{conf}->{snfSaMapping}->[$i]->{shortCircuit}\n";
# }
# END OF DEBUG.
# Initialize the change in the SA score. # Initialize the change in the SA score.
my $deltaScore = 0.0; my $deltaScore = 0.0;
$deltaScore = 0.0; $deltaScore = 0.0;
} }
} }
#print "After comparison. deltaScore: $deltaScore\n"; # DEBUG
# print "After comparison. deltaScore: $deltaScore\n"; # DEBUG
# Submit the score. # Submit the score.
if ($deltaScore) { if ($deltaScore) {

Загрузка…
Отмена
Сохранить