소스 검색

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 년 전
부모
커밋
8a88712984
1개의 변경된 파일16개의 추가작업 그리고 4개의 파일을 삭제
  1. 16
    4
      SNF_CS_Developer_Package/SNF4SA/snf4sa.pm

+ 16
- 4
SNF_CS_Developer_Package/SNF4SA/snf4sa.pm 파일 보기

@@ -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…
취소
저장