]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl add a disconnect function
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 30 Mar 2007 14:50:18 +0000 (14:50 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 30 Mar 2007 14:50:18 +0000 (14:50 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4460 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/bgraph.pl
gui/bweb/cgi/bweb.pl
gui/bweb/lib/Bweb.pm

index 2f1af39f2fb14a98f8caf6bd9b908952defb5d21..01c2891050eeeac2acec47479d91f75099aa122d 100755 (executable)
@@ -498,3 +498,4 @@ $limit
     print $obj->plot([$ret->{date}, $ret->{nb}])->png;    
 }
 
+$dbh->disconnect();
index 6b3dd7d10a60902a3124b4da6fd3baa0bbfcdc88..7ab92e1de04d02f860d3dcef2323840e78a836f9 100755 (executable)
@@ -382,6 +382,7 @@ if ($action eq 'begin') {           # main display
 
 $bweb->display_end();
 
+$bweb->dbh_disconnect();
 
 __END__
 
index e978fdcaacacb88083949cce436e2f61b4d2a2fa..007ff6429949ae9a90aec1bfe0ab6c11cf81fbcc 100644 (file)
@@ -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) = @_;