[icinga-checkins] icinga.org: icinga-core/master: idoutils: fix dbversion checks on solaris/ oracle

git at icinga.org git at icinga.org
Sat Apr 30 21:33:37 CEST 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Feb 24 17:19:07 2011 +0100

idoutils: fix dbversion checks on solaris/oracle

---

 module/idoutils/src/db.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index f7c0c66..6b4b127 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -1294,11 +1294,11 @@ int ido2db_db_version_check(ido2db_idi *idi) {
 
         if(OCI_FetchNext(idi->dbinfo.oci_resultset)) {
                 ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_version_check() fetchnext ok\n");
-                idi->dbinfo.dbversion=OCI_GetString(idi->dbinfo.oci_resultset, 1);
+                idi->dbinfo.dbversion=strdup(OCI_GetString(idi->dbinfo.oci_resultset, 1));
+        	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_hello(version=%s)\n", idi->dbinfo.dbversion);
         } else {
                 ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_version_check() fetchnext not ok\n");
         }
-        ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_hello(version=%s)\n", dbversion);
 
 
 #endif





More information about the icinga-checkins mailing list