[icinga-checkins] icinga.org: icinga-core/tdressler/testido: Revert "idoutils: oracle fixes"

git at icinga.org git at icinga.org
Wed Aug 3 11:52:55 CEST 2011


Module: icinga-core
Branch: tdressler/testido
Commit: b28ed5a043f2f81a90856c864fdfaf80d9dc348e
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=b28ed5a043f2f81a90856c864fdfaf80d9dc348e

Author: Thomas Dressler <tdressler at tdressler.net>
Date:   Wed Aug  3 11:38:08 2011 +0200

Revert "idoutils:  oracle fixes"

This reverts commit b1fc92b1d42ab39a00abc0d583f56413afbfad0f.
unwanted changes

---

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

diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index 0a284ab..9b98c74 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -2954,15 +2954,15 @@ int ido2db_check_dbd_driver(void) {
 
 void ido2db_ocilib_err_handler(OCI_Error *err) {
 	OCI_Statement *st=NULL;
-//	OCI_Error *arrerr;
+	OCI_Error *arrerr;
 	const mtext *sql = "";
 	unsigned int  err_type;
 	const char * err_msg;
 	char * errt_msg = NULL;
 	char * buf=NULL;
 	char * binds=NULL;
-//	int arrerrcount=0;
-//	int arrsize=0;
+	int arrerrcount=0;
+	int arrsize=0;
 	unsigned int err_pos=0;
 	err_type = OCI_ErrorGetType(err);
 	err_msg  = OCI_ErrorGetString(err);
@@ -2976,10 +2976,6 @@ void ido2db_ocilib_err_handler(OCI_Error *err) {
 	if (st) {
 		sql= OCI_GetSql(st);
 		err_pos=OCI_GetSqlErrorPos(st);
-		/* todo needs to be checked,
-		 * OCI_GetBatchErrorCount(st) works not as expected
-		 */
-		/*
 		arrsize=OCI_BindArrayGetSize(st);
 		if (arrsize>0) {
 			arrerrcount=OCI_GetBatchErrorCount(st);
@@ -2992,7 +2988,6 @@ void ido2db_ocilib_err_handler(OCI_Error *err) {
 				}
 			}
 		}
-		*/
 		if (OCI_GetBindCount(st)>0) {
 			binds=malloc(OCI_VARCHAR_SIZE*16);
 			if (binds==NULL) {
diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index d472d6d..5f1fc07 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -5306,7 +5306,7 @@ int ido2db_handle_runtimevariables(ido2db_idi *idi) {
 #ifdef USE_ORACLE /* Oracle ocilib specific */
 		ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_handle_runtimevariables"
 				"(Pos %lu) Id=%lu %s=%s\n",
-					arrsize+count,idi->dbinfo.instance_id,es[0],es[1]);
+					arrsize+count,idi->dbinfo.instance_id,es[1],es[2]);
 		/* copy instanceid and configfile_id to array */
 		instid_arr[arrsize]=idi->dbinfo.instance_id;
 





More information about the icinga-checkins mailing list