[icinga-checkins] icinga.org: icinga-core/mfriedrich/ocilib: fix ssl merge, remove dead code

git at icinga.org git at icinga.org
Mon Oct 19 18:11:21 CEST 2009


Module: icinga-core
Branch: mfriedrich/ocilib
Commit: fd594b391ac0d69dd2e39ecf2f9d186d473490df
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=fd594b391ac0d69dd2e39ecf2f9d186d473490df

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Oct 19 18:10:57 2009 +0200

fix ssl merge, remove dead code

---

 module/idoutils/src/db.c     |   11 ++++-------
 module/idoutils/src/ido2db.c |    6 ++++++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index 941fe6e..d8557af 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -324,17 +324,14 @@ int ndo2db_db_connect(ndo2db_idi *idi) {
 	idi->dbinfo.oci_connection = OCI_ConnectionCreate((mtext *)ndo2db_db_settings.dbname, (mtext *)ndo2db_db_settings.username, (mtext *)ndo2db_db_settings.password, OCI_SESSION_DEFAULT);
 	
 	if(idi->dbinfo.oci_connection == NULL) {
-		syslog(LOG_USER | LOG_INFO, "Error: Could not connect to database: %s", OCI_ErrorGetString(OCI_GetLastError()));
-		ndo2db_log_debug_info(NDO2DB_DEBUGL_PROCESSINFO, 2, "Error: Could not connect to database\n");
+		syslog(LOG_USER | LOG_INFO, "Error: Could not connect to oracle database: %s", OCI_ErrorGetString(OCI_GetLastError()));
+		ndo2db_log_debug_info(NDO2DB_DEBUGL_PROCESSINFO, 2, "Error: Could not connect to oracle database\n");
                 result = NDO_ERROR;
                 idi->disconnect_client = NDO_TRUE;
         } else {
                 idi->dbinfo.connected = NDO_TRUE;
-                syslog(LOG_USER | LOG_INFO, "Successfully connected to database");
-		ndo2db_log_debug_info(NDO2DB_DEBUGL_PROCESSINFO, 2, "Successfully connected to database\n");
-        
-		/* create statement handler */
-		//idi->dbinfo.oci_statement = OCI_StatementCreate(idi->dbinfo.oci_connection);
+                syslog(LOG_USER | LOG_INFO, "Successfully connected to oracle database");
+		ndo2db_log_debug_info(NDO2DB_DEBUGL_PROCESSINFO, 2, "Successfully connected to oracle database\n");
 	}
 
 #endif /* Oracle ocilib specific */
diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index 784a0f1..ec25342 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -222,6 +222,12 @@ int main(int argc, char **argv){
 	ndo2db_log_debug_info(NDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db with ocilib() driver check\n");
 	if(OCI_GetOCIRuntimeVersion == OCI_UNKNOWN) {
 		printf("Unknown ocilib runtime version detected. Exiting...\n");
+
+#ifdef HAVE_SSL 
+                if(use_ssl==NDO_TRUE)
+                        SSL_CTX_free(ctx);
+#endif
+
 		exit(1);
 	}
 





More information about the icinga-checkins mailing list