[icinga-checkins] icinga.org: icinga-core/test/cgis: * idoutils: add table name to clear table debug output

git at icinga.org git at icinga.org
Tue Jul 5 21:38:13 CEST 2011


Module: icinga-core
Branch: test/cgis
Commit: 7bbad1b70822ea86da9dc56517c558a1c024575f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=7bbad1b70822ea86da9dc56517c558a1c024575f

Author: Thomas Dressler <tdressler at tdressler.net>
Date:   Sat Jun 18 17:48:12 2011 +0200

* idoutils: add table name to clear table debug output

---

 module/idoutils/src/db.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index fe863bc..4f11118 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -2600,10 +2600,13 @@ int ido2db_db_clear_table(ido2db_idi *idi, char *table_name) {
         void *data[2];
 #endif
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_clear_table() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_clear_table(%s) start\n",table_name);
 
-	if (idi == NULL || table_name == NULL)
+	if (idi == NULL || table_name == NULL){
+		ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_clear_table(%s) Error:IDI or table name NULL\n",table_name);
 		return IDO_ERROR;
+	}
+
 
 #ifdef USE_LIBDBI /* everything else will be libdbi */
 	if (asprintf(&buf, "DELETE FROM %s WHERE instance_id=%lu", table_name, idi->dbinfo.instance_id) == -1)
@@ -2642,7 +2645,7 @@ int ido2db_db_clear_table(ido2db_idi *idi, char *table_name) {
 
 #endif /* Oracle ocilib specific */
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_clear_table() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_clear_table(%s) end\n",table_name);
 	return result;
 }
 





More information about the icinga-checkins mailing list