mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-03 12:35:46 +00:00
move sync_v2_init() into main_service_ready
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2652 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
8671945cef
commit
e88aebbac7
42
exec/main.c
42
exec/main.c
@ -122,8 +122,6 @@ static struct corosync_api_v1 *api = NULL;
|
||||
|
||||
static enum cs_sync_mode minimum_sync_mode;
|
||||
|
||||
static enum cs_sync_mode minimum_sync_mode;
|
||||
|
||||
static int sync_in_process = 1;
|
||||
|
||||
static hdb_handle_t corosync_poll_handle;
|
||||
@ -1181,6 +1179,26 @@ static void main_service_ready (void)
|
||||
evil_init (api);
|
||||
corosync_stats_init ();
|
||||
corosync_totem_stats_init ();
|
||||
if (minimum_sync_mode == CS_SYNC_V2) {
|
||||
log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to none. Using V2 of the synchronization engine.\n");
|
||||
sync_v2_init (
|
||||
corosync_sync_v2_callbacks_retrieve,
|
||||
corosync_sync_completed);
|
||||
} else
|
||||
if (minimum_sync_mode == CS_SYNC_V1) {
|
||||
log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to whitetank. Using V1 and V2 of the synchronization engine.\n");
|
||||
sync_register (
|
||||
corosync_sync_callbacks_retrieve,
|
||||
sync_v2_memb_list_determine,
|
||||
sync_v2_memb_list_abort,
|
||||
sync_v2_start);
|
||||
|
||||
sync_v2_init (
|
||||
corosync_sync_v2_callbacks_retrieve,
|
||||
corosync_sync_completed);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
@ -1477,26 +1495,6 @@ int main (int argc, char **argv)
|
||||
&corosync_group,
|
||||
1);
|
||||
|
||||
if (minimum_sync_mode == CS_SYNC_V2) {
|
||||
log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to none. Using V2 of the synchronization engine.\n");
|
||||
sync_v2_init (
|
||||
corosync_sync_v2_callbacks_retrieve,
|
||||
corosync_sync_completed);
|
||||
} else
|
||||
if (minimum_sync_mode == CS_SYNC_V1) {
|
||||
log_printf (LOGSYS_LEVEL_NOTICE, "Compatibility mode set to whitetank. Using V1 and V2 of the synchronization engine.\n");
|
||||
sync_register (
|
||||
corosync_sync_callbacks_retrieve,
|
||||
sync_v2_memb_list_determine,
|
||||
sync_v2_memb_list_abort,
|
||||
sync_v2_start);
|
||||
|
||||
sync_v2_init (
|
||||
corosync_sync_v2_callbacks_retrieve,
|
||||
corosync_sync_completed);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Drop root privleges to user 'ais'
|
||||
* TODO: Don't really need full root capabilities;
|
||||
|
Loading…
Reference in New Issue
Block a user