[icinga-checkins] icinga.org: icinga-core/cmaser/fixes: re-add some prototypes and definitions

git at icinga.org git at icinga.org
Sat Jul 3 22:41:49 CEST 2010


Module: icinga-core
Branch: cmaser/fixes
Commit: f13f8bad6f9ba928505c41b856b1b0fa1f0c7335
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=f13f8bad6f9ba928505c41b856b1b0fa1f0c7335

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Jun 28 10:12:06 2010 +0200

re-add some prototypes and definitions

---

 Changelog         |    1 -
 common/macros.c   |   15 +++++++++++++++
 include/broker.h  |    3 ++-
 include/icinga.h  |    8 ++++++++
 include/macros.h  |    3 +++
 include/objects.h |    6 ++++++
 6 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index f53301e..7c2dac6 100644
--- a/Changelog
+++ b/Changelog
@@ -66,7 +66,6 @@ FIXES
 * core: xodtemplate: Use macro magic to get rid of 900 LoC (Andreas Ericsson)
 * core: more s/malloc(size) + init/calloc(1, size)/ replacements (Andreas Ericsson)
 * core: header files: Remove dead prototypes (Andreas Ericsson)
-* core: remove grab_contactgroup_macros() and its prototype (Andreas Ericsson)
 * core: base/commands.c: Fix error path of opening checkresult files (Andreas Ericsson)
 * core: fix open() error checking in move_check_result_to_queue() (Andreas Ericsson)
 * core: xdata/xpddefault.c: Close perfdata files if fd's are >= 0 (Andreas Ericsson)
diff --git a/common/macros.c b/common/macros.c
index 5cae0b4..149b338 100644
--- a/common/macros.c
+++ b/common/macros.c
@@ -355,6 +355,21 @@ int grab_contact_macros(contact *cntct){
 	}
 
 
+/* grab contactgroup macros */
+int grab_contactgroup_macros(contactgroup *cg){
+
+        /* clear contactgroup macros */
+        clear_contactgroup_macros();
+ 
+        /* save pointer to contactgroup for later */
+        macro_contactgroup_ptr=cg;
+ 
+        if(cg==NULL)
+                return ERROR;
+ 
+        return OK;
+        }
+
 
 /******************************************************************/
 /******************* MACRO GENERATION FUNCTIONS *******************/
diff --git a/include/broker.h b/include/broker.h
index 654b52a..abae40b 100644
--- a/include/broker.h
+++ b/include/broker.h
@@ -48,7 +48,7 @@
 #define BROKER_COMMENT_DATA         	256	/* DONE */
 #define BROKER_DOWNTIME_DATA		512     /* DONE */
 #define BROKER_SYSTEM_COMMANDS          1024	/* DONE */
-#define BROKER_OCP_DATA_UNUSED          2048	/* reusable */
+#define BROKER_OCP_DATA                 2048	/* DONE */
 #define BROKER_STATUS_DATA              4096    /* DONE */
 #define BROKER_ADAPTIVE_DATA            8192    /* DONE */
 #define BROKER_EXTERNALCOMMAND_DATA     16384   /* DONE */
@@ -189,6 +189,7 @@ void broker_program_state(int,int,int,struct timeval *);
 void broker_timed_event(int,int,int,timed_event *,struct timeval *);
 void broker_log_data(int,int,int,char *,unsigned long,time_t,struct timeval *);
 void broker_event_handler(int,int,int,int,void *,int,int,struct timeval,struct timeval,double,int,int,int,char *,char *,char *,struct timeval *);
+void broker_ocp_data(int,int,int,void *,int,int,double,int,int,struct timeval *);
 void broker_system_command(int,int,int,struct timeval,struct timeval,double,int,int,int,char *,char *,struct timeval *);
 int broker_host_check(int,int,int,host *,int,int,int,struct timeval,struct timeval,char *,double,double,int,int,int,char *,char *,char *,char *,struct timeval *);
 int broker_service_check(int,int,int,service *,int,struct timeval,struct timeval,char *,double,double,int,int,int,char *,struct timeval *);
diff --git a/include/icinga.h b/include/icinga.h
index db55220..7b9d413 100644
--- a/include/icinga.h
+++ b/include/icinga.h
@@ -567,6 +567,8 @@ void sighandler(int);                                	/* handles signals */
 void service_check_sighandler(int);                     /* handles timeouts when executing service checks */
 void host_check_sighandler(int);                        /* handles timeouts when executing host checks */
 void my_system_sighandler(int);				/* handles timeouts when executing commands via my_system() */
+void file_lock_sighandler(int);                         /* handles timeouts while waiting for file locks */
+
 char *get_next_string_from_buf(char *buf, int *start_index, int bufsize);
 int compare_strings(char *,char *);                     /* compares two strings for equality */
 char *escape_newlines(char *);
@@ -612,6 +614,7 @@ int cmd_add_comment(int,time_t,char *);				/* add a service or host comment */
 int cmd_delete_comment(int,char *);				/* delete a service or host comment */
 int cmd_delete_all_comments(int,char *);			/* delete all comments associated with a host or service */
 int cmd_delay_notification(int,char *);				/* delay a service or host notification */
+int cmd_schedule_service_check(int,char *,int);                 /* schedule an immediate or delayed service check */
 int cmd_schedule_check(int,char *);				/* schedule an immediate or delayed host check */
 int cmd_schedule_host_service_checks(int,char *,int);		/* schedule an immediate or delayed checks of all services on a host */
 int cmd_signal_process(int,char *);				/* schedules a program shutdown or restart */
@@ -693,6 +696,11 @@ void enable_contact_service_notifications(contact *);   /* enables service notif
 void disable_contact_service_notifications(contact *);  /* disables service notifications for a specific contact */
 void display_schedule(void);				/* display scheduling queue */
 
+int init_check_result_worker_thread(void);
+int shutdown_check_result_worker_thread(void);
+void * check_result_worker_thread(void *);
+void cleanup_check_result_worker_thread(void *);
+
 int init_command_file_worker_thread(void);
 int shutdown_command_file_worker_thread(void);
 void * command_file_worker_thread(void *);
diff --git a/include/macros.h b/include/macros.h
index b1ae914..a3ad2f1 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -217,6 +217,9 @@ int grab_host_macros(host *);                        	/* updates the host macro
 int grab_servicegroup_macros(servicegroup *);           /* updates servicegroup macros */
 int grab_hostgroup_macros(hostgroup *);                 /* updates hostgroup macros */
 int grab_contact_macros(contact *);                  	/* updates the contact macro data */
+int grab_contactgroup_macros(contactgroup *);           /* updates contactgroup macros */
+int grab_datetime_macros(void);                         /* updates date/time macros */
+int grab_on_demand_macro(char *);                       /* fetches an on-demand macro */
 
 char *get_url_encoded_string(char *);			/* URL encode a string */
 
diff --git a/include/objects.h b/include/objects.h
index 22463d3..f7bea36 100644
--- a/include/objects.h
+++ b/include/objects.h
@@ -782,6 +782,9 @@ int add_object_to_objectlist(objectlist **,void *);
 int free_objectlist(objectlist **);
 #endif
 
+/**** Object Hash Functions ****/
+int add_servicedependency_to_hashlist(servicedependency *);
+
 
 /**** Object Query Functions ****/
 int is_host_immediate_child_of_host(host *,host *);	                /* checks if a host is an immediate child of another host */	
@@ -790,6 +793,9 @@ int is_host_immediate_parent_of_host(host *,host *);	                /* checks i
 int is_host_member_of_hostgroup(hostgroup *,host *);		        /* tests whether or not a host is a member of a specific hostgroup */
 int is_host_member_of_servicegroup(servicegroup *,host *);	        /* tests whether or not a service is a member of a specific servicegroup */
 int is_service_member_of_servicegroup(servicegroup *,service *);	/* tests whether or not a service is a member of a specific servicegroup */
+int is_contact_member_of_contactgroup(contactgroup *, contact *);      	/* tests whether or not a contact is a member of a specific contact group */
+int is_contact_for_hostgroup(hostgroup *,contact *);                   	/* tests whether or not a contact is a member of a specific hostgroup */
+int is_contact_for_servicegroup(servicegroup *,contact *);             	/* tests whether or not a contact is a member of a specific servicegroup */
 int is_contact_for_host(host *,contact *);			        /* tests whether or not a contact is a contact member for a specific host */
 int is_escalated_contact_for_host(host *,contact *);                    /* checks whether or not a contact is an escalated contact for a specific host */
 int is_contact_for_service(service *,contact *);		        /* tests whether or not a contact is a contact member for a specific service */





More information about the icinga-checkins mailing list