[icinga-checkins] icinga.org: icinga-core/fholzer/core: Move dbh error into the correct scope

git at icinga.org git at icinga.org
Mon Apr 23 08:00:06 CEST 2012


Module: icinga-core
Branch: fholzer/core
Commit: 6d88b29c98b3a22bdbbab88bf1a4f173169203a0
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=6d88b29c98b3a22bdbbab88bf1a4f173169203a0

Author: Alexander Wirt <formorer at debian.org>
Date:   Sun Apr 22 09:24:39 2012 +0200

Move dbh error into the correct scope

---

 tools/icinga_verification.pl |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 058fd45..8aeb23b 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -237,12 +237,13 @@ if ( !$mysqlcheck ) {
         "ido2db.cfg - MySQL Connect Failed. - check your config";
 
     chomp($dbh_cfg_error);
-}
 
-if ( !$dbh_cfg_error ) {
-    $dbh_cfg->disconnect();
+    if ( !$dbh_cfg_error ) {
+        $dbh_cfg->disconnect();
+    }
 }
 
+
 # Test Print Out
 # later create a fileout with the output
 





More information about the icinga-checkins mailing list