[Nagios-checkins] nagios/xdata xrddefault.c,1.71,1.72

Ethan Galstad egalstad at users.sourceforge.net
Wed Sep 1 14:12:34 UTC 2010


Update of /cvsroot/nagios/nagios/xdata
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv14941/xdata

Modified Files:
	xrddefault.c 
Log Message:
Fix for retaining display name and alias (Folkert)

Index: xrddefault.c
===================================================================
RCS file: /cvsroot/nagios/nagios/xdata/xrddefault.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** xrddefault.c	6 Aug 2010 12:45:46 -0000	1.71
--- xrddefault.c	1 Sep 2010 14:12:32 -0000	1.72
***************
*** 5,9 ****
   * Copyright (c) 2009 Nagios Core Development Team and Community Contributors
   * Copyright (c) 1999-2010 Ethan Galstad (egalstad at nagios.org)
!  * Last Modified: 08-06-2010
   *
   * License:
--- 5,9 ----
   * Copyright (c) 2009 Nagios Core Development Team and Community Contributors
   * Copyright (c) 1999-2010 Ethan Galstad (egalstad at nagios.org)
!  * Last Modified: 09-01-2010
   *
   * License:
***************
*** 362,365 ****
--- 362,367 ----
  		fprintf(fp,"host {\n");
  		fprintf(fp,"host_name=%s\n",temp_host->name);
+ 		fprintf(fp,"alias=%s\n",temp_host->alias);
+ 		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);
***************
*** 432,435 ****
--- 434,438 ----
  		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));
***************
*** 1199,1202 ****
--- 1202,1213 ----
  						else if(!strcmp(var,"last_hard_state"))
  							temp_host->last_hard_state=atoi(val);
+ 						else if(!strcmp(var,"alias")){
+ 							my_free(temp_host->alias);
+ 							temp_host->alias=(char *)strdup(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);
***************
*** 1470,1473 ****
--- 1481,1488 ----
  						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);





More information about the Nagios-commits mailing list