[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: Fix bug in json output in host availability report
git at icinga.org
git at icinga.org
Thu Feb 21 19:32:09 CET 2013
Module: icinga-core
Branch: mfriedrich/core
Commit: d7af9701a4e47172fb233813af5d4e7f35c8c972
URL: https://git.icinga.org/?p=icinga-core.git;a=commit;h=d7af9701a4e47172fb233813af5d4e7f35c8c972
Author: Michael Luebben <michael_luebben at web.de>
Date: Wed Jan 9 15:03:22 2013 +0100
Fix bug in json output in host availability report
---
cgi/avail.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cgi/avail.c b/cgi/avail.c
index 49696c7..20ac244 100644
--- a/cgi/avail.c
+++ b/cgi/avail.c
@@ -3536,7 +3536,7 @@ void display_specific_hostgroup_availability(hostgroup *hg) {
/* host name */
printf("{ \"%s\": \"%s\", ", hheader[0], json_encode(temp_subject->host_name));
- printf("{ \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
+ printf(" \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
/* up times */
printf(" \"%s\": %lu, ", hheader[1], temp_subject->scheduled_time_up);
@@ -3935,7 +3935,7 @@ void display_specific_servicegroup_availability(servicegroup *sg) {
/* host name */
printf("{ \"%s\": \"%s\", ", hheader[0], json_encode(temp_subject->host_name));
- printf("{ \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
+ printf(" \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
/* up times */
printf(" \"%s\": %lu, ", hheader[1], temp_subject->scheduled_time_up);
@@ -4695,7 +4695,7 @@ void display_host_availability(void) {
/* host name */
printf("{ \"%s\": \"%s\", ", hheader[0], json_encode(temp_subject->host_name));
- printf("{ \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
+ printf(" \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
/* up times */
printf(" \"%s\": %lu, ", hheader[1], temp_subject->scheduled_time_up);
@@ -5123,7 +5123,7 @@ void display_host_availability(void) {
/* host name */
printf("{ \"%s\": \"%s\", ", hheader[0], json_encode(temp_subject->host_name));
- printf("{ \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
+ printf(" \"%s\": \"%s\", ", hheader[37], (temp_host->display_name != NULL) ? json_encode(temp_host->display_name) : json_encode(temp_host->name));
/* up times */
printf(" \"%s\": %lu, ", hheader[1], temp_subject->scheduled_time_up);
More information about the icinga-checkins
mailing list