public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman: port to the latest corosync API
@ 2009-06-30 8:08 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-06-30 8:08 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cf170452fec28e7f03d1b1f80c28846e6e016a00
Commit: cf170452fec28e7f03d1b1f80c28846e6e016a00
Parent: 51177a5e1b86b1eb4768f4d593b85d71e190fda3
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Tue Jun 30 10:07:50 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Jun 30 10:07:50 2009 +0200
cman: port to the latest corosync API
this requires corosync 0.99 or higher to build and work.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/daemon/ais.c | 3 ++-
cman/daemon/daemon.c | 5 ++---
cman/daemon/daemon.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cman/daemon/ais.c b/cman/daemon/ais.c
index ffea8c2..dd6037e 100644
--- a/cman/daemon/ais.c
+++ b/cman/daemon/ais.c
@@ -102,6 +102,7 @@ static struct corosync_service_engine cman_service_handler = {
.lib_exit_fn = cman_exit_fn,
.exec_init_fn = cman_exec_init_fn,
.config_init_fn = NULL,
+ .sync_mode = CS_SYNC_V1,
};
static struct corosync_service_engine *cman_get_handler_ver0(void)
@@ -193,7 +194,7 @@ static int cman_exec_init_fn(struct corosync_api_v1 *api)
/* An error message will have been written to cman_pipe */
exit(9);
}
- cman_init();
+ cman_init(api);
/* Let cman_tool know we are running and our PID */
sprintf(pipe_msg,"SUCCESS: %d", getpid());
diff --git a/cman/daemon/daemon.c b/cman/daemon/daemon.c
index cfaea2d..64607cc 100644
--- a/cman/daemon/daemon.c
+++ b/cman/daemon/daemon.c
@@ -494,13 +494,12 @@ static void sigint_handler(int ignored)
quit_threads = 1;
}
-extern hdb_handle_t corosync_poll_handle;
-int cman_init()
+int cman_init(struct corosync_api_v1 *api)
{
int fd;
struct sigaction sa;
- cs_poll_handle = corosync_poll_handle;
+ cs_poll_handle = api->poll_handle_get();
barrier_init();
log_printf(LOG_INFO, "CMAN %s (built %s %s) started\n",
diff --git a/cman/daemon/daemon.h b/cman/daemon/daemon.h
index 4c202ef..49611b1 100644
--- a/cman/daemon/daemon.h
+++ b/cman/daemon/daemon.h
@@ -4,7 +4,7 @@ extern void set_cman_timeout(int secs);
extern void notify_listeners(struct connection *con, int reason, int arg);
extern int num_listeners(void);
extern void cman_set_realtime(void);
-extern int cman_init(void);
+extern int cman_init(struct corosync_api_v1 *api);
extern int cman_finish(void);
extern void notify_confchg(struct sock_header *message);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-30 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 8:08 cluster: STABLE3 - cman: port to the latest corosync API Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).