[open-ils-commits] r8247 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 20 09:47:55 EST 2007
Author: miker
Date: 2007-12-20 09:26:10 -0500 (Thu, 20 Dec 2007)
New Revision: 8247
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
make single-service errors less destructive, and use direct array for service name list
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2007-12-20 14:03:14 UTC (rev 8246)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2007-12-20 14:26:10 UTC (rev 8247)
@@ -149,6 +149,7 @@
my @connections;
my @results;
+ my @services;
for (my $i = 0; $i < @{$$args{service}}; $i++) {
my %tmp_args = %$args;
@@ -171,12 +172,14 @@
$tmp_args{query} = compile_query('and', $tmp_args{service}, $tmp_args{search});
my $res = $self->do_service_search( $conn, $auth, \%tmp_args );
- return $res if $U->event_code($res);
+ if ($U->event_code($res)) {
+ $conn->respond($res) if $U->event_code($res);
+ next;
+ }
+ push @services, $tmp_args{service};
push @results, $res->{result};
push @connections, $res->{connection};
-
- $logger->debug("z3950: Result object: $results[$i], Connection object: $connections[$i]");
}
$logger->debug("z3950: Connections created");
@@ -186,7 +189,7 @@
$logger->debug("z3950: Received event $ev");
if ($ev == OpenILS::Utils::ZClient::EVENT_END()) {
my $munged = process_results( $results[$index - 1], $$args{limit}, $$args{offset} );
- $$munged{service} = $$args{service}[$index - 1];
+ $$munged{service} = $services[$index - 1];
$conn->respond($munged);
}
}
More information about the open-ils-commits
mailing list