Title: [opsview-base] [163] Updated as process_passive_check works differently in Nagios 4
Revision
163
Author
tvoon
Date
2012-12-19 17:20:21 +0000 (Wed, 19 Dec 2012)

Log Message

Updated as process_passive_check works differently in Nagios 4

Modified Paths


Modified: trunk/patches/altinity_set_initial_state.c
===================================================================
--- trunk/patches/altinity_set_initial_state.c	2012-12-19 17:16:02 UTC (rev 162)
+++ trunk/patches/altinity_set_initial_state.c	2012-12-19 17:20:21 UTC (rev 163)
@@ -209,6 +209,7 @@
 	host *temp_host;
 	service *temp_service;
 	time_t now;
+	char *output = NULL;
 
 	now=time(&now);
 	
@@ -217,13 +218,18 @@
 
 	for(temp_host=host_list;temp_host!=NULL;temp_host=temp_host->next){
 		if(temp_host->has_been_checked==FALSE){
-			process_passive_host_check(now,temp_host->name,0,"Host assumed UP - no results received");
+			// This must be copied because Nagios 4 will change data inline
+			output = strdup("Host assumed UP - no results received");
+			process_passive_host_check(now,temp_host->name,0,output);
+			free(output);
 			}
 		}
 
 	for(temp_service=service_list;temp_service!=NULL;temp_service=temp_service->next){
 		if(temp_service->has_been_checked==FALSE){
+			output = strdup("Service assumed OK - no results received");
 			process_passive_service_check(now,temp_service->host_name,temp_service->description,0,"Service assumed OK - no results received");
+			free(output);
 			}
 		}
 

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to