[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: fix int vs unsigned long mismatches from previous commits #2536 #2537

git at icinga.org git at icinga.org
Mon Apr 23 13:37:35 CEST 2012


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Apr 23 13:35:01 2012 +0200

fix int vs unsigned long mismatches from previous commits #2536 #2537

refs #2536
refs #2537

---

 cgi/extinfo.c     |    6 +++---
 common/downtime.c |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/cgi/extinfo.c b/cgi/extinfo.c
index fd40616..678c74e 100644
--- a/cgi/extinfo.c
+++ b/cgi/extinfo.c
@@ -3293,17 +3293,17 @@ void show_downtime(int type) {
 		get_time_breakdown(temp_downtime->duration, &days, &hours, &minutes, &seconds);
 		if (content_type == JSON_CONTENT) {
 			printf("\"duration\": \"%dd %dh %dm %ds\", ", days, hours, minutes, seconds);
-			printf("\"is_in_effect\": %lu, ", temp_downtime->is_in_effect);
+			printf("\"is_in_effect\": %d, ", temp_downtime->is_in_effect);
 			printf("\"downtime_id\": %lu, ", temp_downtime->downtime_id);
 			printf("\"trigger_id\": \"");
 		} else if (content_type == CSV_CONTENT) {
 			printf("%s%dd %dh %dm %ds%s%s", csv_data_enclosure, days, hours, minutes, seconds, csv_data_enclosure, csv_delimiter);
-			printf("%s%lu%s%s", csv_data_enclosure, temp_downtime->is_in_effect, csv_data_enclosure, csv_delimiter);
+			printf("%s%d%s%s", csv_data_enclosure, temp_downtime->is_in_effect, csv_data_enclosure, csv_delimiter);
 			printf("%s%lu%s%s", csv_data_enclosure, temp_downtime->downtime_id, csv_data_enclosure, csv_delimiter);
 			printf("%s", csv_data_enclosure);
 		} else {
 			printf("<td CLASS='%s'>%dd %dh %dm %ds</td>", bg_class, days, hours, minutes, seconds);
-			printf("<td CLASS='%s'>%lu</td>", bg_class, temp_downtime->is_in_effect);
+			printf("<td CLASS='%s'>%d</td>", bg_class, temp_downtime->is_in_effect);
 			printf("<td CLASS='%s'>%lu</td>", bg_class, temp_downtime->downtime_id);
 			printf("<td CLASS='%s'>", bg_class);
 		}
diff --git a/common/downtime.c b/common/downtime.c
index 86ccc2c..880a6d8 100644
--- a/common/downtime.c
+++ b/common/downtime.c
@@ -408,9 +408,9 @@ int handle_scheduled_downtime(scheduled_downtime *temp_downtime) {
 	)){
 
 		if (temp_downtime->type == HOST_DOWNTIME)
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' ending %s scheduled downtime (id=%lu) with depth=%lu, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
 		else
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' ending %s scheduled downtime (id=%lu) with depth=%lu, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
 
 
 #ifdef USE_EVENT_BROKER
@@ -490,14 +490,14 @@ int handle_scheduled_downtime(scheduled_downtime *temp_downtime) {
 	/* else we are just starting the scheduled downtime */
 	else {
 		if (temp_downtime->type == HOST_DOWNTIME)
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' starting %s scheduled downtime (id=%lu) with depth=%lu, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
 		else
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' starting %s scheduled downtime (id=%lu) with depth=%lu, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
 
 		/* this happens after restart of icinga */
 		if (temp_downtime->is_in_effect != TRUE) {
 			if (temp_downtime->type == HOST_DOWNTIME && hst->scheduled_downtime_depth == 0) {
-		
+
 				/* set the trigger time, needed to detect the end of a flexible downtime */
 				temp_downtime->trigger_time = current_time;
 
@@ -511,7 +511,7 @@ int handle_scheduled_downtime(scheduled_downtime *temp_downtime) {
 			}
 
 			else if (temp_downtime->type == SERVICE_DOWNTIME && svc->scheduled_downtime_depth == 0) {
-		
+
 				/* set the trigger time, needed to detect the end of a flexible downtime */
 				temp_downtime->trigger_time = current_time;
 





More information about the icinga-checkins mailing list