[icinga-checkins] icinga.org: icinga-core/r1.3: idoutils: increase debugoutput for conversion functions #1094

git at icinga.org git at icinga.org
Mon Jan 10 20:03:48 CET 2011


Module: icinga-core
Branch: r1.3
Commit: cf2d084a5e81cd58b4c04b8e4f75f41528616744
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=cf2d084a5e81cd58b4c04b8e4f75f41528616744

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Jan 10 20:03:02 2011 +0100

idoutils: increase debugoutput for conversion functions #1094

fixes #1094

---

 Changelog                    |    1 +
 module/idoutils/src/db.c     |    8 ++++----
 module/idoutils/src/ido2db.c |   22 +++++++++++-----------
 3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/Changelog b/Changelog
index 1eaf415..d7c5a4c 100644
--- a/Changelog
+++ b/Changelog
@@ -77,6 +77,7 @@ FIXES
 * idoutils: fix ido2db needs to check for empty command arguments on Solaris (Julian Wiesner) #1047
 * idoutils: fix solaris <= lacks asprintf (Julian Wiesner) #1048
 * idoutils: fix unfreed oci handles in prepared statements #1093
+* idoutils: increase debugoutput for conversion functions #1094
 
 
 1.2.1 - 25/10/2010
diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c
index 851285f..ad7185c 100644
--- a/module/idoutils/src/db.c
+++ b/module/idoutils/src/db.c
@@ -2277,7 +2277,7 @@ char *ido2db_db_escape_string(ido2db_idi *idi, char *buf) {
 char *ido2db_db_timet_to_sql(ido2db_idi *idi, time_t t) {
 	char *buf = NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_timet_to_sql() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_timet_to_sql(%lu) start\n", (unsigned long)t);
 
 	switch (idi->dbinfo.server_type) {
 		case IDO2DB_DBSERVER_MYSQL:
@@ -2316,7 +2316,7 @@ char *ido2db_db_timet_to_sql(ido2db_idi *idi, time_t t) {
                         break;
 	}
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_timet_to_sql() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_timet_to_sql(%s) end\n", buf);
 
 	return buf;
 }
@@ -2327,7 +2327,7 @@ char *ido2db_db_timet_to_sql(ido2db_idi *idi, time_t t) {
 char *ido2db_db_sql_to_timet(ido2db_idi *idi, char *field) {
 	char *buf = NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_sql_to_timet() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_sql_to_timet(%s) start\n", field);
 
 	switch (idi->dbinfo.server_type) {
 		case IDO2DB_DBSERVER_MYSQL:
@@ -2365,7 +2365,7 @@ char *ido2db_db_sql_to_timet(ido2db_idi *idi, char *field) {
                         break;
         }
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_sql_to_timet() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_sql_to_timet(%s) end\n", buf);
 
 	return buf;
 }
diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index 224abfd..b19ac4f 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -2319,14 +2319,14 @@ int ido2db_convert_standard_data_elements(ido2db_idi *idi, int *type, int *flags
 
 int ido2db_convert_string_to_int(char *buf, int *i){
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_int() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_int(%s) start\n", buf);
 
 	if(buf==NULL)
 		return IDO_ERROR;
 
 	*i=atoi(buf);
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_int() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_int(%d) end\n", i);
 	return IDO_OK;
         }
 
@@ -2334,7 +2334,7 @@ int ido2db_convert_string_to_int(char *buf, int *i){
 int ido2db_convert_string_to_float(char *buf, float *f){
 	char *endptr=NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_float() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_float(%s) start\n", buf);
 
 	if(buf==NULL)
 		return IDO_ERROR;
@@ -2351,7 +2351,7 @@ int ido2db_convert_string_to_float(char *buf, float *f){
 	if(errno==ERANGE)
 		return IDO_ERROR;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_float() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_float(%f) end\n", f);
 	return IDO_OK;
         }
 
@@ -2359,7 +2359,7 @@ int ido2db_convert_string_to_float(char *buf, float *f){
 int ido2db_convert_string_to_double(char *buf, double *d){
 	char *endptr=NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_double() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_double(%s) start\n", buf);
 	if(buf==NULL)
 		return IDO_ERROR;
 
@@ -2370,7 +2370,7 @@ int ido2db_convert_string_to_double(char *buf, double *d){
 	if(errno==ERANGE)
 		return IDO_ERROR;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_double() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_double(%lf) end\n", d);
 	return IDO_OK;
         }
 
@@ -2378,7 +2378,7 @@ int ido2db_convert_string_to_double(char *buf, double *d){
 int ido2db_convert_string_to_long(char *buf, long *l){
 	char *endptr=NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_long() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_long(%s) start\n", buf);
 
 	if(buf==NULL)
 		return IDO_ERROR;
@@ -2390,7 +2390,7 @@ int ido2db_convert_string_to_long(char *buf, long *l){
 	if(*l==0L && endptr==buf)
 		return IDO_ERROR;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_long() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_long(%l) end\n", l);
 	return IDO_OK;
         }
 
@@ -2398,7 +2398,7 @@ int ido2db_convert_string_to_long(char *buf, long *l){
 int ido2db_convert_string_to_unsignedlong(char *buf, unsigned long *ul){
 	char *endptr=NULL;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_unsignedlong() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_unsignedlong(%s) start\n", buf);
 
 	if(buf==NULL)
 		return IDO_ERROR;
@@ -2409,7 +2409,7 @@ int ido2db_convert_string_to_unsignedlong(char *buf, unsigned long *ul){
 	if(*ul==0L && endptr==buf)
 		return IDO_ERROR;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_unsignedlong() end\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_unsignedlong(%lu) end\n", ul);
 	return IDO_OK;
 }
 
@@ -2419,7 +2419,7 @@ int ido2db_convert_string_to_timeval(char *buf, struct timeval *tv){
 	char *ptr=NULL;
 	int result=IDO_OK;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_timeval() start\n");
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_convert_string_to_timeval(%s) start\n", buf);
 
 	if(buf==NULL)
 		return IDO_ERROR;





More information about the icinga-checkins mailing list