[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/z3950 processz3950queue [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/z3950 processz3950queue [rel_2_2] |
Date: |
Fri, 22 Sep 2006 15:51:40 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <tipaul> 06/09/22 15:51:40
Modified files:
z3950 : processz3950queue
Log message:
fixing a bug that seems to be a Perl problem
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/processz3950queue?cvsroot=koha&only_with_tag=rel_2_2&r1=1.13.2.4&r2=1.13.2.5
Patches:
Index: processz3950queue
===================================================================
RCS file: /cvsroot/koha/koha/z3950/Attic/processz3950queue,v
retrieving revision 1.13.2.4
retrieving revision 1.13.2.5
diff -u -b -r1.13.2.4 -r1.13.2.5
--- processz3950queue 31 Aug 2006 16:30:26 -0000 1.13.2.4
+++ processz3950queue 22 Sep 2006 15:51:40 -0000 1.13.2.5
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: processz3950queue,v 1.13.2.4 2006/08/31 16:30:26 tipaul Exp $
+# $Id: processz3950queue,v 1.13.2.5 2006/09/22 15:51:40 tipaul Exp $
use MARC::Record;
use C4::Context;
use DBI;
@@ -110,6 +110,7 @@
my $db_user = C4::Context->config("user");
my $db_passwd = C4::Context->config("pass");
my $dbh = DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user,
$db_passwd);
+# print "DBI : $db_driver:$db_name:$db_host,$db_user, $db_passwd";
# we begin the script, so "unactive" every pending request : they will never
give anything, the script died :-(
my $sth=$dbh->prepare("update z3950results set active=0 where active<>-1");
@@ -216,13 +217,15 @@
my $error=0;
# the z3950 query is builded. Launch it.
if ($user) {
- $conn= new
ZOOM::Connection($servername, $port, databaseName => $database, user => $user,
password => $password) || ($noconnection=1);
+ $conn= new
ZOOM::Connection($servername, $port, databaseName => "$database", user =>
"$user", password => "$password");
+ $noconnection=1 if $@;
} else {
- $conn= new
ZOOM::Connection($servername, $port, databaseName => $database) ||
($noconnection=1);
+ $conn= new
ZOOM::Connection($servername, $port, databaseName => $database);
+ $noconnection=1 if $@;
}
if ($noconnection ||
$error) {
# if connection impossible, don't go further !
- print "$$/$id :
no connection at $globalname\n";
+ print "$$/$id :
no connection at $globalname ($servername, $port,$database,$user,$password)\n";
my $result =
MARC::Record->new();
my
($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) =
ImportBreeding($result,-1,"$globalname server is NOT responding","",$random);
} else {
- [Koha-cvs] koha/z3950 processz3950queue [rel_2_2],
paul poulain <=