Kaynağa Gözat

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 14 yıl önce
ebeveyn
işleme
8a88712984
1 değiştirilmiş dosya ile 16 ekleme ve 4 silme
  1. 16
    4
      SNF_CS_Developer_Package/SNF4SA/snf4sa.pm

+ 16
- 4
SNF_CS_Developer_Package/SNF4SA/snf4sa.pm Dosyayı Görüntüle

@@ -313,7 +313,7 @@ sub parse_snf_sa_mapping
# Sort the SNFServer result codes and remove duplicates.
@snfCode = sort { $a <=> $b } @snfCode;
my $prev = -1;
my @temp = grep($_ != $prev && ($prev = $_), @snfCode);
my @temp = grep($_ != $prev && (($prev) = $_), @snfCode);
$ret_hash->{snfCode} = \@temp;
# The $specVal[$lastSpec] is $self->{SA_DeltaScoreKey}. Return if
@@ -387,8 +387,6 @@ sub get_code_values
# Split the specification.
my @codeVal = split(/-/, $specElement);
#$self->log_debug("snf4sa: get_code_values. specElement: $specElement. codeVal: @codeVal"); # DEBUG
if (1 == @codeVal) {
if ($specElement =~ /^\d+$/) {
@@ -498,6 +496,20 @@ sub snf4sa_sacheck {
$rcx = 'Unknown' unless $rcx;
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.
my $deltaScore = 0.0;
@@ -548,7 +560,7 @@ sub snf4sa_sacheck {
$deltaScore = 0.0;
}
}
#print "After comparison. deltaScore: $deltaScore\n"; # DEBUG
# print "After comparison. deltaScore: $deltaScore\n"; # DEBUG
# Submit the score.
if ($deltaScore) {

Loading…
İptal
Kaydet