[Pkg-nagios-devel] nagios/patches 12_xrddb.c-errorhandling.dpatch, NONE, 1.1

seanius at haydn.debian.org seanius at haydn.debian.org
Mon Aug 29 16:33:16 UTC 2005


Update of /cvsroot/pkg-nagios/nagios/patches
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv15256/patches

Added Files:
	12_xrddb.c-errorhandling.dpatch 
Log Message:
finnaly include a fix for 311695

--- NEW FILE: 12_xrddb.c-errorhandling.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 12_xrddb.c-errorhandling.dpatch by  <seanius at debian.org>
##
## DP: slightly more intelligent error handling for db connections.
## DP: see #311695 for more information.

@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./xdata/xrddb.c /home/seanius/tmp/dpep-work.XbHUZ5/sid/xdata/xrddb.c
--- ./xdata/xrddb.c	2005-08-29 12:28:37.000000000 -0400
+++ /home/seanius/tmp/dpep-work.XbHUZ5/sid/xdata/xrddb.c	2005-08-29 12:28:58.000000000 -0400
@@ -641,7 +641,7 @@
 			snprintf(buffer,sizeof(buffer)-1,"Error: Could not insert retention data for host '%s' in table '%s'\n",host_name,XRDDB_HOSTRETENTION_TABLE);
 			buffer[sizeof(buffer)-1]='\x0';
 			write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
-			continue;
+			return ERROR;
 		        }
 
 		temp_host=get_host_state_information(temp_host,&host_name,&state,&plugin_output,&last_check,&checks_enabled,&time_up,&time_down,&time_unreachable,&last_notification,&current_notification_number,&notifications_enabled,&event_handler_enabled,&problem_has_been_acknowledged,&flap_detection_enabled,&failure_prediction_enabled,&process_performance_data,&last_state_change);
@@ -738,7 +738,7 @@
 			snprintf(buffer,sizeof(buffer)-1,"Error: Could not insert retention data for service '%s' on host '%s' in table '%s'\n",service_description,host_name,XRDDB_SERVICERETENTION_TABLE);
 			buffer[sizeof(buffer)-1]='\x0';
 			write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
-			continue;
+			return ERROR;
 		        }
 
 		temp_service=get_service_state_information(temp_service,&host_name,&service_description,&state,&plugin_output,&last_check,&check_type,&time_ok,&time_warning,&time_unknown,&time_critical,&last_notification,&current_notification_number,&notifications_enabled,&checks_enabled,&accept_passive_checks,&event_handler_enabled,&problem_has_been_acknowledged,&flap_detection_enabled,&failure_prediction_enabled,&process_performance_data,&obsess_over_service,&last_state_change);




More information about the Pkg-nagios-devel mailing list