summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-03-19 15:56:01 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-22 08:26:26 (GMT)
commit920a449af5a6b4ecbf01a5a4e3bc4894ad302634 (patch)
tree4ad974029f82f751004e205440862ad45ccd5b63 /git-cvsserver.perl
parenteb1780d480c2c57c58024692055a6ee33074a95f (diff)
downloadgit-920a449af5a6b4ecbf01a5a4e3bc4894ad302634.zip
git-920a449af5a6b4ecbf01a5a4e3bc4894ad302634.tar.gz
git-920a449af5a6b4ecbf01a5a4e3bc4894ad302634.tar.bz2
cvsserver: Abort if connect to database fails
Currently all calls to the database backend make no error checking or handling at all. At least abort if the connection to the database failed since there is really no way we could do anything useful after that. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 6d10aa3..941a91b 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2168,6 +2168,7 @@ sub new
$self->{dbh} = DBI->connect("$self->{dbdriver}:dbname=$self->{dbname}",
$self->{dbuser},
$self->{dbpass});
+ die "Error connecting to database\n" unless defined $self->{dbh};
$self->{tables} = {};
foreach my $table ( $self->{dbh}->tables )