From: Eric Bollengier Date: Fri, 30 Mar 2007 14:50:18 +0000 (+0000) Subject: ebl add a disconnect function X-Git-Tag: Release-2.2.0~814 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7e89fac91461dde9e93fab625c122cd0545e23d7;p=bacula%2Fbacula ebl add a disconnect function git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4460 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/cgi/bgraph.pl b/gui/bweb/cgi/bgraph.pl index 2f1af39f2f..01c2891050 100755 --- a/gui/bweb/cgi/bgraph.pl +++ b/gui/bweb/cgi/bgraph.pl @@ -498,3 +498,4 @@ $limit print $obj->plot([$ret->{date}, $ret->{nb}])->png; } +$dbh->disconnect(); diff --git a/gui/bweb/cgi/bweb.pl b/gui/bweb/cgi/bweb.pl index 6b3dd7d10a..7ab92e1de0 100755 --- a/gui/bweb/cgi/bweb.pl +++ b/gui/bweb/cgi/bweb.pl @@ -382,6 +382,7 @@ if ($action eq 'begin') { # main display $bweb->display_end(); +$bweb->dbh_disconnect(); __END__ diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index e978fdcaac..007ff64299 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -1071,6 +1071,15 @@ our %sql_func = ( }, ); +sub dbh_disconnect +{ + my ($self) = @_; + if ($self->{dbh}) { + $self->{dbh}->disconnect(); + undef self->{dbh}; + } +} + sub dbh_selectall_arrayref { my ($self, $query) = @_;