mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-15 01:57:41 +00:00
Add dump_state to coroapi.h. Need to remove logging output from signal
handlers. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2281 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
19e1f60dd3
commit
71d2a32512
@ -140,7 +140,8 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
|
||||
.plugin_interface_release = lcr_ifact_release,
|
||||
.error_memory_failure = _corosync_out_of_memory_error,
|
||||
.fatal_error = _corosync_public_exit_error,
|
||||
.request_shutdown = corosync_request_shutdown
|
||||
.request_shutdown = corosync_request_shutdown,
|
||||
.state_dump = corosync_state_dump
|
||||
};
|
||||
|
||||
void apidef_init (struct objdb_iface_ver0 *objdb) {
|
||||
|
11
exec/main.c
11
exec/main.c
@ -124,7 +124,7 @@ hdb_handle_t corosync_poll_handle;
|
||||
|
||||
struct sched_param global_sched_param;
|
||||
|
||||
static void sigusr2_handler (int num)
|
||||
void corosync_state_dump (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -135,6 +135,15 @@ static void sigusr2_handler (int num)
|
||||
}
|
||||
}
|
||||
|
||||
static void sigusr2_handler (int num)
|
||||
{
|
||||
/*
|
||||
* TODO remove this from sigusr2 handler and access via cfg service
|
||||
* engine api - corosync-cfgtool
|
||||
*/
|
||||
corosync_state_dump ();
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO this function needs some love
|
||||
*/
|
||||
|
@ -66,4 +66,6 @@ extern int message_source_is_local (const mar_message_source_t *source);
|
||||
|
||||
extern void corosync_request_shutdown (void);
|
||||
|
||||
extern void corosync_state_dump (void);
|
||||
|
||||
#endif /* MAIN_H_DEFINED */
|
||||
|
@ -576,6 +576,8 @@ struct corosync_api_v1 {
|
||||
void (*fatal_error) (cs_fatal_error_t err, const char *file, unsigned int line);
|
||||
|
||||
void (*request_shutdown) (void);
|
||||
|
||||
void (*state_dump) (void);
|
||||
};
|
||||
|
||||
#define SERVICE_ID_MAKE(a,b) ( ((a)<<16) | (b) )
|
||||
|
Loading…
Reference in New Issue
Block a user