This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: master - cman: make it compile and run with latest corosync
- From: Christine Caulfield <chrissie at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 19 May 2009 09:55:26 +0000 (UTC)
- Subject: cluster: master - cman: make it compile and run with latest corosync
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4186326fcfd9b55e8fbd915eb7435e495b6451a6
Commit: 4186326fcfd9b55e8fbd915eb7435e495b6451a6
Parent: 9fafcadd76709f24b86e8888e6987b6edebac265
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Tue May 19 10:55:02 2009 +0100
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Tue May 19 10:55:02 2009 +0100
cman: make it compile and run with latest corosync
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/config/cman-preconfig.c | 8 +-
cman/services/cman/include/corosync/ipc_cman.h | 11 +-
cman/services/cman/lib/Makefile | 2 +-
cman/services/cman/lib/libcman.c | 117 +++++++++++-------------
cman/services/cman/services/cman.c | 100 ++++++++++-----------
5 files changed, 112 insertions(+), 126 deletions(-)
diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c
index d720554..e4facb1 100644
--- a/cman/config/cman-preconfig.c
+++ b/cman/config/cman-preconfig.c
@@ -986,11 +986,11 @@ static int copy_config_tree(struct objdb_iface_ver0 *objdb, hdb_handle_t source_
hdb_handle_t new_object;
hdb_handle_t find_handle;
char object_name[1024];
- int object_name_len;
+ size_t object_name_len;
void *key_name;
- int key_name_len;
+ size_t key_name_len;
void *key_value;
- int key_value_len;
+ size_t key_value_len;
int res;
/* Create new parent object if necessary */
@@ -1004,7 +1004,7 @@ static int copy_config_tree(struct objdb_iface_ver0 *objdb, hdb_handle_t source_
/* Copy the keys */
objdb->object_key_iter_reset(new_object);
- while (!objdb->object_key_iter(source_object, &key_name, &key_name_len,
+ while (!objdb->object_key_iter(new_object, &key_name, &key_name_len,
&key_value, &key_value_len)) {
objdb->object_key_create(new_object, key_name, key_name_len,
diff --git a/cman/services/cman/include/corosync/ipc_cman.h b/cman/services/cman/include/corosync/ipc_cman.h
index 40ab128..d74f152 100644
--- a/cman/services/cman/include/corosync/ipc_cman.h
+++ b/cman/services/cman/include/corosync/ipc_cman.h
@@ -2,7 +2,6 @@
#define IPC_CMAN_H_DEFINED
#include <netinet/in.h>
-#include "corosync/ipc_gen.h"
#define CMAN_SERVICE 9
@@ -24,12 +23,12 @@ enum res_cman_types {
#define TOTEMIP_ADDRLEN (sizeof(struct in6_addr))
struct req_lib_cman_bind {
- mar_req_header_t header __attribute__((aligned(8)));
+ coroipc_request_header_t header __attribute__((aligned(8)));
unsigned int port;
};
struct req_lib_cman_sendmsg {
- mar_req_header_t header __attribute__((aligned(8)));
+ coroipc_request_header_t header __attribute__((aligned(8)));
unsigned int to_port;
unsigned int to_node;
unsigned int msglen;
@@ -37,7 +36,7 @@ struct req_lib_cman_sendmsg {
};
struct res_lib_cman_sendmsg {
- mar_req_header_t header __attribute__((aligned(8)));
+ coroipc_response_header_t header __attribute__((aligned(8)));
unsigned int from_port;
unsigned int from_node;
unsigned int msglen;
@@ -45,13 +44,13 @@ struct res_lib_cman_sendmsg {
};
struct req_lib_cman_is_listening {
- mar_req_header_t header __attribute__((aligned(8)));
+ coroipc_request_header_t header __attribute__((aligned(8)));
unsigned int port;
unsigned int nodeid;
};
struct res_lib_cman_is_listening {
- mar_res_header_t header __attribute__((aligned(8)));
+ coroipc_response_header_t header __attribute__((aligned(8)));
unsigned int status;
};
diff --git a/cman/services/cman/lib/Makefile b/cman/services/cman/lib/Makefile
index 0365c4f..654f55c 100644
--- a/cman/services/cman/lib/Makefile
+++ b/cman/services/cman/lib/Makefile
@@ -15,5 +15,5 @@ CFLAGS += -I${ccsincdir} -I${cmanincdir}
CFLAGS += -I${incdir}
CFLAGS += -I../include
-LDFLAGS += -L${corosynclibdir} -lcoroipc -lcfg -lvotequorum
+LDFLAGS += -L${corosynclibdir} -lcoroipcc -lcfg -lvotequorum
LDFLAGS += -L${ccslibdir} -lccs
diff --git a/cman/services/cman/lib/libcman.c b/cman/services/cman/lib/libcman.c
index 3771a7d..d03238f 100644
--- a/cman/services/cman/lib/libcman.c
+++ b/cman/services/cman/lib/libcman.c
@@ -14,9 +14,10 @@
#include <limits.h>
#include <corosync/corotypes.h>
-#include <corosync/coroipc.h>
-#include <corosync/mar_gen.h>
-#include <corosync/ipc_gen.h>
+#include <corosync/coroipc_types.h>
+#include <corosync/coroipcc.h>
+#include <corosync/corodefs.h>
+#include <corosync/hdb.h>
#include <corosync/cfg.h>
#include <corosync/confdb.h>
#include <corosync/votequorum.h>
@@ -25,20 +26,24 @@
#include "ccs.h"
#include "libcman.h"
+DECLARE_HDB_DATABASE(cman_handle_t_db,NULL);
+
#define CMAN_MAGIC 0x434d414e
+#define IPC_REQUEST_SIZE 8192*128
+#define IPC_RESPONSE_SIZE 8192*128
+#define IPC_DISPATCH_SIZE 8192*128
+
#define CMAN_SHUTDOWN_ANYWAY 1
#define CMAN_SHUTDOWN_REMOVED 2
struct cman_inst {
int magic;
- void *ipc_ctx;
+ hdb_handle_t handle;
int finalize;
void *privdata;
cman_datacallback_t data_callback;
cman_callback_t notify_callback;
- pthread_mutex_t response_mutex;
- pthread_mutex_t dispatch_mutex;
int node_count;
votequorum_node_t * node_list;
@@ -149,27 +154,41 @@ cman_handle_t cman_init (
void *privdata)
{
cs_error_t error;
+ hdb_handle_t handle;
struct cman_inst *cman_inst;
- cman_inst = malloc(sizeof(struct cman_inst));
- if (!cman_inst)
- return NULL;
+ error = hdb_handle_create (&cman_handle_t_db, sizeof (struct cman_inst), &handle);
+ if (error) {
+ goto error_no_destroy;
+ }
- memset(cman_inst, 0, sizeof(struct cman_inst));
- error = cslib_service_connect (CMAN_SERVICE, &cman_inst->ipc_ctx);
+ error = hdb_handle_get (&cman_handle_t_db, handle, (void *)&cman_inst);
+ if (error) {
+ goto error_destroy;
+ }
+
+ error = coroipcc_service_connect (
+ COROSYNC_SOCKET_NAME,
+ CMAN_SERVICE,
+ IPC_REQUEST_SIZE,
+ IPC_RESPONSE_SIZE,
+ IPC_DISPATCH_SIZE,
+ &cman_inst->handle);
if (error != CS_OK) {
- goto error;
+ goto error_put_destroy;
}
cman_inst->privdata = privdata;
cman_inst->magic = CMAN_MAGIC;
- pthread_mutex_init (&cman_inst->response_mutex, NULL);
- pthread_mutex_init (&cman_inst->dispatch_mutex, NULL);
+ cman_inst->handle = handle;
return (void *)cman_inst;
-error:
- free(cman_inst);
+error_put_destroy:
+ hdb_handle_put (&cman_handle_t_db, handle);
+error_destroy:
+ hdb_handle_destroy (&cman_handle_t_db, handle);
+error_no_destroy:
errno = ENOMEM;
return NULL;
}
@@ -207,25 +226,20 @@ int cman_finish (
if (handle == admin_inst)
admin_inst = NULL;
- pthread_mutex_lock (&cman_inst->response_mutex);
-
/*
* Another thread has already started finalizing
*/
if (cman_inst->finalize) {
- pthread_mutex_unlock (&cman_inst->response_mutex);
errno = EINVAL;
return -1;
}
cman_inst->finalize = 1;
- pthread_mutex_unlock (&cman_inst->response_mutex);
-
/*
* Disconnect from the server
*/
- cslib_service_disconnect (cman_inst->ipc_ctx);
+ coroipcc_service_disconnect (cman_inst->handle);
return 0;
}
@@ -245,13 +259,11 @@ int cman_start_recv_data (
struct cman_inst *cman_inst;
struct iovec iov[2];
struct req_lib_cman_bind req_lib_cman_bind;
- mar_res_header_t res;
+ coroipc_response_header_t res;
cman_inst = (struct cman_inst *)handle;
VALIDATE_HANDLE(cman_inst);
- pthread_mutex_lock (&cman_inst->response_mutex);
-
req_lib_cman_bind.header.size = sizeof (struct req_lib_cman_bind);
req_lib_cman_bind.header.id = MESSAGE_REQ_CMAN_BIND;
req_lib_cman_bind.port = port;
@@ -259,11 +271,9 @@ int cman_start_recv_data (
iov[0].iov_base = (char *)&req_lib_cman_bind;
iov[0].iov_len = sizeof (struct req_lib_cman_bind);
- error = cslib_msg_send_reply_receive (cman_inst->ipc_ctx,
+ error = coroipcc_msg_send_reply_receive (cman_inst->handle,
iov, 1,
- &res, sizeof (mar_res_header_t));
-
- pthread_mutex_unlock (&cman_inst->response_mutex);
+ &res, sizeof (coroipc_response_header_t));
if (error != CS_OK) {
goto error_exit;
@@ -281,25 +291,21 @@ int cman_end_recv_data (
int error;
struct cman_inst *cman_inst;
struct iovec iov[2];
- mar_req_header_t req;
- mar_res_header_t res;
+ coroipc_response_header_t req;
+ coroipc_response_header_t res;
cman_inst = (struct cman_inst *)handle;
VALIDATE_HANDLE(cman_inst);
- pthread_mutex_lock (&cman_inst->response_mutex);
-
- req.size = sizeof (mar_req_header_t);
+ req.size = sizeof (coroipc_response_header_t);
req.id = MESSAGE_REQ_CMAN_UNBIND;
iov[0].iov_base = (char *)&req;
- iov[0].iov_len = sizeof (mar_req_header_t);
+ iov[0].iov_len = sizeof (coroipc_response_header_t);
- error = cslib_msg_send_reply_receive (cman_inst->ipc_ctx,
+ error = coroipcc_msg_send_reply_receive (cman_inst->handle,
iov, 1,
- &res, sizeof (mar_res_header_t));
-
- pthread_mutex_unlock (&cman_inst->response_mutex);
+ &res, sizeof (coroipc_response_header_t));
if (error != CS_OK) {
goto error_exit;
@@ -319,14 +325,12 @@ int cman_send_data(cman_handle_t handle, const void *message, int len, int flags
struct iovec iov[2];
char buf[len+sizeof(struct req_lib_cman_sendmsg)];
struct req_lib_cman_sendmsg *req_lib_cman_sendmsg = (struct req_lib_cman_sendmsg *)buf;
- mar_res_header_t res;
+ coroipc_response_header_t res;
cman_inst = (struct cman_inst *)handle;
VALIDATE_HANDLE(cman_inst);
- pthread_mutex_lock (&cman_inst->response_mutex);
-
- req_lib_cman_sendmsg->header.size = sizeof (mar_req_header_t);
+ req_lib_cman_sendmsg->header.size = sizeof (coroipc_response_header_t);
req_lib_cman_sendmsg->header.id = MESSAGE_REQ_CMAN_SENDMSG;
req_lib_cman_sendmsg->to_port = port;
req_lib_cman_sendmsg->to_node = nodeid;
@@ -336,11 +340,9 @@ int cman_send_data(cman_handle_t handle, const void *message, int len, int flags
iov[0].iov_base = buf;
iov[0].iov_len = len+sizeof(struct req_lib_cman_sendmsg);
- error = cslib_msg_send_reply_receive (cman_inst->ipc_ctx,
+ error = coroipcc_msg_send_reply_receive (cman_inst->handle,
iov, 1,
- &res, sizeof (mar_res_header_t));
-
- pthread_mutex_unlock (&cman_inst->response_mutex);
+ &res, sizeof (coroipc_response_header_t));
if (error != CS_OK) {
goto error_exit;
@@ -367,8 +369,6 @@ int cman_is_listening (
cman_inst = (struct cman_inst *)handle;
VALIDATE_HANDLE(cman_inst);
- pthread_mutex_lock (&cman_inst->response_mutex);
-
req_lib_cman_is_listening.header.size = sizeof (struct req_lib_cman_is_listening);
req_lib_cman_is_listening.header.id = MESSAGE_REQ_CMAN_IS_LISTENING;
req_lib_cman_is_listening.nodeid = nodeid;
@@ -377,12 +377,10 @@ int cman_is_listening (
iov[0].iov_base = (char *)&req_lib_cman_is_listening;
iov[0].iov_len = sizeof (struct req_lib_cman_is_listening);
- error = cslib_msg_send_reply_receive (cman_inst->ipc_ctx,
+ error = coroipcc_msg_send_reply_receive (cman_inst->handle,
iov, 1,
&res_lib_cman_is_listening, sizeof (struct res_lib_cman_is_listening));
- pthread_mutex_unlock (&cman_inst->response_mutex);
-
if (error != CS_OK) {
goto error_exit;
}
@@ -608,7 +606,7 @@ int cman_get_fd (
cman_inst = (struct cman_inst *)handle;
VALIDATE_HANDLE(cman_inst);
- fd = cslib_fd_get (cman_inst->ipc_ctx);
+ coroipcc_fd_get (cman_inst->handle, &fd);
return fd;
}
@@ -735,7 +733,7 @@ int cman_set_dirty(cman_handle_t handle)
struct res_overlay {
- mar_res_header_t header __attribute__((aligned(8)));
+ coroipc_response_header_t header __attribute__((aligned(8)));
char data[512000];
};
@@ -771,23 +769,17 @@ int cman_dispatch (
}
do {
- pthread_mutex_lock (&cman_inst->dispatch_mutex);
-
- dispatch_avail = cslib_dispatch_recv (cman_inst->ipc_ctx,
+ dispatch_avail = coroipcc_dispatch_get (cman_inst->handle,
(void *)&dispatch_data, timeout);
- pthread_mutex_unlock (&cman_inst->dispatch_mutex);
-
if (error != CS_OK) {
goto error_put;
}
if (dispatch_avail == 0 && dispatch_types == CMAN_DISPATCH_ALL) {
- pthread_mutex_unlock (&cman_inst->dispatch_mutex);
break; /* exit do while cont is 1 loop */
} else
if (dispatch_avail == 0) {
- pthread_mutex_unlock (&cman_inst->dispatch_mutex);
continue; /* next poll */
}
if (dispatch_avail == -1) {
@@ -798,7 +790,6 @@ int cman_dispatch (
}
goto error_put;
}
- pthread_mutex_unlock (&cman_inst->dispatch_mutex);
/*
* Dispatch incoming message
@@ -959,7 +950,7 @@ int cman_set_version(cman_handle_t handle, const cman_version_t *version)
return -1;
}
- if (confdb_reload(confdb_handle, 0, error) != CS_OK) {
+ if (confdb_reload(confdb_handle, 0, error, sizeof(error)) != CS_OK) {
ret = EINVAL;
}
diff --git a/cman/services/cman/services/cman.c b/cman/services/cman/services/cman.c
index ebaeffc..7455dea 100644
--- a/cman/services/cman/services/cman.c
+++ b/cman/services/cman/services/cman.c
@@ -21,11 +21,11 @@
#include <arpa/inet.h>
#include <corosync/corotypes.h>
+#include <corosync/coroipc_types.h>
#include <corosync/cfg.h>
#include <corosync/list.h>
#include <corosync/lcr/lcr_comp.h>
#include <corosync/engine/logsys.h>
-#include <corosync/ipc_gen.h>
#include <corosync/engine/coroapi.h>
#include <corosync/ipc_cman.h>
#include <corosync/cman.h>
@@ -36,7 +36,7 @@
#define MAX_INTERFACES 4
-LOGSYS_DECLARE_SUBSYS ("CMAN", LOG_INFO);
+LOGSYS_DECLARE_SUBSYS ("CMAN");
/* Messages we send on port 0 */
#define CLUSTER_MSG_PORTOPENED 2
@@ -91,14 +91,14 @@ static struct list_head node_list;
* Service Interfaces required by service_message_handler struct
*/
-static void cman_deliver_fn(unsigned int nodeid, struct iovec *iovec, int iov_len,
- int endian_conversion_required);
+static void cman_deliver_fn(unsigned int nodeid, const void *buf, unsigned int buf_len,
+ int endian_conversion_required);
static void cman_confchg_fn(enum totem_configuration_type configuration_type,
- unsigned int *member_list, int member_list_entries,
- unsigned int *left_list, int left_list_entries,
- unsigned int *joined_list, int joined_list_entries,
- struct memb_ring_id *ring_id);
+ const unsigned int *member_list, size_t member_list_entries,
+ const unsigned int *left_list, size_t left_list_entries,
+ const unsigned int *joined_list, size_t joined_list_entries,
+ const struct memb_ring_id *ring_id);
static int cman_exec_init_fn (struct corosync_api_v1 *corosync_api);
@@ -106,10 +106,10 @@ static int cman_lib_init_fn (void *conn);
static int cman_lib_exit_fn (void *conn);
-static void message_handler_req_lib_cman_is_listening (void *conn, void *msg);
-static void message_handler_req_lib_cman_sendmsg (void *conn, void *msg);
-static void message_handler_req_lib_cman_unbind (void *conn, void *msg);
-static void message_handler_req_lib_cman_bind (void *conn, void *msg);
+static void message_handler_req_lib_cman_is_listening (void *conn, const void *msg);
+static void message_handler_req_lib_cman_sendmsg (void *conn, const void *msg);
+static void message_handler_req_lib_cman_unbind (void *conn, const void *msg);
+static void message_handler_req_lib_cman_bind (void *conn, const void *msg);
/*
* Library Handler Definition
@@ -118,26 +118,18 @@ static struct corosync_lib_handler cman_lib_service[] =
{
{ /* 0 */
.lib_handler_fn = message_handler_req_lib_cman_sendmsg,
- .response_size = sizeof (mar_res_header_t),
- .response_id = MESSAGE_RES_CMAN_SENDMSG,
.flow_control = COROSYNC_LIB_FLOW_CONTROL_REQUIRED
},
{ /* 1 */
.lib_handler_fn = message_handler_req_lib_cman_is_listening,
- .response_size = sizeof (struct res_lib_cman_is_listening),
- .response_id = MESSAGE_RES_CMAN_IS_LISTENING,
.flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
},
{ /* 2 */
.lib_handler_fn = message_handler_req_lib_cman_bind,
- .response_size = sizeof (mar_res_header_t),
- .response_id = MESSAGE_RES_CMAN_BIND,
.flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
},
{ /* 3 */
.lib_handler_fn = message_handler_req_lib_cman_unbind,
- .response_size = sizeof (mar_res_header_t),
- .response_id = MESSAGE_RES_CMAN_UNBIND,
.flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
}
};
@@ -314,7 +306,7 @@ static int cman_exec_init_fn (struct corosync_api_v1 *api)
{
hdb_handle_t find_handle;
- log_printf(LOG_LEVEL_NOTICE, "cman_exec_init_fn \n");
+ log_printf(LOGSYS_LEVEL_NOTICE, "cman_exec_init_fn \n");
corosync_api = api;
@@ -366,10 +358,10 @@ static int cman_lib_exit_fn (void *conn)
}
static void cman_confchg_fn(enum totem_configuration_type configuration_type,
- unsigned int *member_list, int member_list_entries,
- unsigned int *left_list, int left_list_entries,
- unsigned int *joined_list, int joined_list_entries,
- struct memb_ring_id *ring_id)
+ const unsigned int *member_list, size_t member_list_entries,
+ const unsigned int *left_list, size_t left_list_entries,
+ const unsigned int *joined_list, size_t joined_list_entries,
+ const struct memb_ring_id *ring_id)
{
int i;
struct cluster_node *node;
@@ -383,47 +375,51 @@ static void cman_confchg_fn(enum totem_configuration_type configuration_type,
}
-static void cman_deliver_fn(unsigned int nodeid, struct iovec *iovec, int iov_len,
+static void cman_deliver_fn(unsigned int nodeid, const void *buf, unsigned int buf_len,
int endian_conversion_required)
{
- struct cman_protheader *header = iovec->iov_base;
- char *buf;
+ const struct cman_protheader *inheader = buf;
+ struct cman_protheader header;
+ const char *charbuf = buf;
if (endian_conversion_required) {
- header->srcid = swab32(header->srcid);
- header->tgtid = swab32(header->tgtid);
- header->flags = swab32(header->flags);
+ header.srcid = swab32(inheader->srcid);
+ header.tgtid = swab32(inheader->tgtid);
+ header.flags = swab32(inheader->flags);
+ }
+ else {
+ memcpy(&header, buf, sizeof(header));
}
/* Messages to be sent to clients */
- if (header->tgtport != 0 &&
- (header->tgtid == our_node.nodeid ||
- header->tgtid == 0)) {
- buf = iovec->iov_base + sizeof(struct cman_protheader);
+ if (header.tgtport != 0 &&
+ (header.tgtid == our_node.nodeid ||
+ header.tgtid == 0)) {
+ buf += sizeof(struct cman_protheader);
- if (ports[header->tgtport]) {
- corosync_api->ipc_response_send(ports[header->tgtport], buf, iovec->iov_len - sizeof(struct cman_protheader));
+ if (ports[header.tgtport]) {
+ corosync_api->ipc_response_send(ports[header.tgtport], buf, buf_len - sizeof(struct cman_protheader));
}
}
/* Our messages. Careful here, messages for the quorum module on port 0 also
arrive here and must be ignored */
- if (header->tgtport == 0 &&
- (header->tgtid == our_node.nodeid ||
- header->tgtid == 0)) {
+ if (header.tgtport == 0 &&
+ (header.tgtid == our_node.nodeid ||
+ header.tgtid == 0)) {
struct cluster_node *node;
- buf = iovec->iov_base + sizeof(struct cman_protheader);
- node = find_node(header->tgtid, 1);
+ buf += sizeof(struct cman_protheader);
+ node = find_node(header.tgtid, 1);
- switch (*buf) {
+ switch (*charbuf) {
case CLUSTER_MSG_PORTOPENED:
if (node) {
if (!(node->flags & NODE_FLAG_PORTS_VALID)) {
char reqmsg = CLUSTER_MSG_PORTENQ;
cman_send_message(0,0, nodeid, &reqmsg, 1);
}
- set_port_bit(node, buf[2]);
+ set_port_bit(node, charbuf[2]);
}
break;
case CLUSTER_MSG_PORTCLOSED:
@@ -432,7 +428,7 @@ static void cman_deliver_fn(unsigned int nodeid, struct iovec *iovec, int iov_le
char reqmsg = CLUSTER_MSG_PORTENQ;
cman_send_message(0,0, nodeid, &reqmsg, 1);
}
- clear_port_bit(node, buf[2]);
+ clear_port_bit(node, charbuf[2]);
}
break;
case CLUSTER_MSG_PORTENQ:
@@ -454,9 +450,9 @@ static void cman_deliver_fn(unsigned int nodeid, struct iovec *iovec, int iov_le
}
}
-static void message_handler_req_lib_cman_bind (void *conn, void *msg)
+static void message_handler_req_lib_cman_bind (void *conn, const void *msg)
{
- mar_res_header_t res;
+ coroipc_response_header_t res;
struct req_lib_cman_bind *req_lib_cman_bind = (struct req_lib_cman_bind *)msg;
struct cman_pd *cman_pd = (struct cman_pd *)corosync_api->ipc_private_data_get (conn);
int error = 0;
@@ -485,9 +481,9 @@ static void message_handler_req_lib_cman_bind (void *conn, void *msg)
corosync_api->ipc_response_send(conn, &res, sizeof(res));
}
-static void message_handler_req_lib_cman_unbind (void *conn, void *msg)
+static void message_handler_req_lib_cman_unbind (void *conn, const void *msg)
{
- mar_res_header_t res;
+ coroipc_response_header_t res;
struct cman_pd *cman_pd = (struct cman_pd *)corosync_api->ipc_private_data_get (conn);
int error = 0;
char portmsg[2];
@@ -508,10 +504,10 @@ static void message_handler_req_lib_cman_unbind (void *conn, void *msg)
corosync_api->ipc_response_send(conn, &res, sizeof(res));
}
-static void message_handler_req_lib_cman_sendmsg (void *conn, void *msg)
+static void message_handler_req_lib_cman_sendmsg (void *conn, const void *msg)
{
struct req_lib_cman_sendmsg *req_lib_cman_sendmsg = (struct req_lib_cman_sendmsg *)msg;
- mar_res_header_t res;
+ coroipc_response_header_t res;
struct cman_pd *cman_pd = (struct cman_pd *)corosync_api->ipc_private_data_get (conn);
int error = CS_OK;
@@ -533,7 +529,7 @@ static void message_handler_req_lib_cman_sendmsg (void *conn, void *msg)
corosync_api->ipc_response_send(conn, &res, sizeof(res));
}
-static void message_handler_req_lib_cman_is_listening (void *conn, void *msg)
+static void message_handler_req_lib_cman_is_listening (void *conn, const void *msg)
{
struct req_lib_cman_is_listening *req_lib_cman_is_listening = (struct req_lib_cman_is_listening *)msg;
struct res_lib_cman_is_listening res_lib_cman_is_listening;