[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: classic ui: fix display_name survive reconfiguration and is use instead of host_name in classic ui #1282

git at icinga.org git at icinga.org
Mon Mar 14 16:25:04 CET 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Mar 14 16:24:48 2011 +0100

classic ui: fix display_name survive reconfiguration and is use instead of host_name in classic ui #1282

fixes #1282

---

 Changelog          |    1 +
 xdata/xrddefault.c |   10 ----------
 2 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/Changelog b/Changelog
index a8f6f40..deb69fc 100644
--- a/Changelog
+++ b/Changelog
@@ -21,6 +21,7 @@ FIXES
 * classic ui: fixed csv export link to make it XSS save (IE) #1275
 * classic ui: cmd.cgi: acknowledgement multiline comment -> command not being processed #1257
 * classic ui: statusmap.cgi: fixed XSS vulnerability #1281
+* classic ui: fix display_name survive reconfiguration and is use instead of host_name in classic ui #1282
 
 
 1.3.0 - 16/02/2011
diff --git a/xdata/xrddefault.c b/xdata/xrddefault.c
index 0c97af3..273348b 100644
--- a/xdata/xrddefault.c
+++ b/xdata/xrddefault.c
@@ -351,7 +351,6 @@ int xrddefault_save_state_information(void){
 
 		fprintf(fp,"host {\n");
 		fprintf(fp,"host_name=%s\n",temp_host->name);
-		fprintf(fp,"display_name=%s\n",temp_host->display_name);
 		fprintf(fp,"modified_attributes=%lu\n",(temp_host->modified_attributes & ~host_attribute_mask));
 		fprintf(fp,"check_command=%s\n",(temp_host->host_check_command==NULL)?"":temp_host->host_check_command);
 		fprintf(fp,"check_period=%s\n",(temp_host->check_period==NULL)?"":temp_host->check_period);
@@ -426,7 +425,6 @@ int xrddefault_save_state_information(void){
 
 		fprintf(fp,"service {\n");
 		fprintf(fp,"host_name=%s\n",temp_service->host_name);
-		fprintf(fp,"display_name=%s\n",temp_service->display_name);
 		fprintf(fp,"service_description=%s\n",temp_service->description);
 		fprintf(fp,"modified_attributes=%lu\n",(temp_service->modified_attributes & ~service_attribute_mask));
 		fprintf(fp,"check_command=%s\n",(temp_service->service_check_command==NULL)?"":temp_service->service_check_command);
@@ -1232,10 +1230,6 @@ int xrddefault_read_retention_file_information(char *retention_file, int overwri
 							temp_host->last_state=atoi(val);
 						else if(!strcmp(var,"last_hard_state"))
 							temp_host->last_hard_state=atoi(val);
-						else if(!strcmp(var,"display_name")){
-							my_free(temp_host->display_name);
-							temp_host->display_name=(char *)strdup(val);
-							}
 						else if(!strcmp(var,"plugin_output")){
 							my_free(temp_host->plugin_output);
 							temp_host->plugin_output=(char *)strdup(val);
@@ -1518,10 +1512,6 @@ int xrddefault_read_retention_file_information(char *retention_file, int overwri
 							temp_service->last_state=atoi(val);
 						else if(!strcmp(var,"last_hard_state"))
 							temp_service->last_hard_state=atoi(val);
-						else if(!strcmp(var,"display_name")){
-							my_free(temp_service->display_name);
-							temp_service->display_name=(char *)strdup(val);
-							}
 						else if(!strcmp(var,"current_attempt"))
 							temp_service->current_attempt=atoi(val);
 						else if(!strcmp(var,"current_event_id"))





More information about the icinga-checkins mailing list