mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2026-01-23 21:47:01 +00:00
Remove MESSAGE_REQ_CPG_GROUPS_GET call and all function using that.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2122 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
230b85044f
commit
37dee7eea1
@ -94,17 +94,9 @@ typedef void (*cpg_confchg_fn_t) (
|
||||
const struct cpg_address *left_list, size_t left_list_entries,
|
||||
const struct cpg_address *joined_list, size_t joined_list_entries);
|
||||
|
||||
typedef void (*cpg_groups_get_fn_t) (
|
||||
cpg_handle_t handle,
|
||||
uint32_t group_num,
|
||||
uint32_t group_total,
|
||||
const struct cpg_name *group_name,
|
||||
const struct cpg_address *member_list, size_t member_list_entries);
|
||||
|
||||
typedef struct {
|
||||
cpg_deliver_fn_t cpg_deliver_fn;
|
||||
cpg_confchg_fn_t cpg_confchg_fn;
|
||||
cpg_groups_get_fn_t cpg_groups_get_fn;
|
||||
} cpg_callbacks_t;
|
||||
|
||||
/** @} */
|
||||
@ -190,10 +182,6 @@ cs_error_t cpg_local_get (
|
||||
cpg_handle_t handle,
|
||||
unsigned int *local_nodeid);
|
||||
|
||||
cs_error_t cpg_groups_get (
|
||||
cpg_handle_t handle,
|
||||
unsigned int *num_groups);
|
||||
|
||||
cs_error_t cpg_flow_control_state_get (
|
||||
cpg_handle_t handle,
|
||||
cpg_flow_control_state_t *flow_control_enabled);
|
||||
|
||||
@ -44,8 +44,7 @@ enum req_cpg_types {
|
||||
MESSAGE_REQ_CPG_MEMBERSHIP = 3,
|
||||
MESSAGE_REQ_CPG_TRACKSTART = 4,
|
||||
MESSAGE_REQ_CPG_TRACKSTOP = 5,
|
||||
MESSAGE_REQ_CPG_LOCAL_GET = 6,
|
||||
MESSAGE_REQ_CPG_GROUPS_GET = 7
|
||||
MESSAGE_REQ_CPG_LOCAL_GET = 6
|
||||
};
|
||||
|
||||
enum res_cpg_types {
|
||||
@ -59,9 +58,7 @@ enum res_cpg_types {
|
||||
MESSAGE_RES_CPG_TRACKSTOP = 7,
|
||||
MESSAGE_RES_CPG_FLOW_CONTROL_STATE_SET = 8,
|
||||
MESSAGE_RES_CPG_LOCAL_GET = 9,
|
||||
MESSAGE_RES_CPG_GROUPS_GET = 10,
|
||||
MESSAGE_RES_CPG_GROUPS_CALLBACK = 11,
|
||||
MESSAGE_RES_CPG_FLOWCONTROL_CALLBACK = 12
|
||||
MESSAGE_RES_CPG_FLOWCONTROL_CALLBACK = 10
|
||||
};
|
||||
|
||||
enum lib_cpg_confchg_reason {
|
||||
@ -163,22 +160,4 @@ struct res_lib_cpg_leave {
|
||||
coroipc_response_header_t header __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
struct req_lib_cpg_groups_get {
|
||||
coroipc_request_header_t header __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
struct res_lib_cpg_groups_get {
|
||||
coroipc_response_header_t header __attribute__((aligned(8)));
|
||||
mar_uint32_t num_groups __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
struct res_lib_cpg_groups_get_callback {
|
||||
coroipc_response_header_t header __attribute__((aligned(8)));
|
||||
mar_uint32_t group_num __attribute__((aligned(8)));
|
||||
mar_uint32_t total_groups __attribute__((aligned(8)));
|
||||
mar_cpg_name_t group_name __attribute__((aligned(8)));
|
||||
mar_uint32_t num_members __attribute__((aligned(8)));
|
||||
mar_cpg_address_t member_list[];
|
||||
};
|
||||
|
||||
#endif /* IPC_CPG_H_DEFINED */
|
||||
|
||||
@ -78,13 +78,6 @@ typedef void (*cpg_confchg_fn_t) (
|
||||
const struct cpg_address *left_list, size_t left_list_entries,
|
||||
const struct cpg_address *joined_list, size_t joined_list_entries);
|
||||
|
||||
typedef void (*cpg_groups_get_fn_t) (
|
||||
cpg_handle_t handle,
|
||||
uint32_t group_num,
|
||||
uint32_t group_total,
|
||||
const struct cpg_name *group_name,
|
||||
struct cpg_address *member_list, size_t member_list_entries);
|
||||
|
||||
.ta
|
||||
.fi
|
||||
.RE
|
||||
@ -102,7 +95,6 @@ argument is of the type:
|
||||
typedef struct {
|
||||
cpg_deliver_fn_t cpg_deliver_fn;
|
||||
cpg_confchg_fn_t cpg_confchg_fn;
|
||||
cpg_groups_get_fn_t cpg_groups_get_fn;
|
||||
} cpg_callbacks_t;
|
||||
.ta
|
||||
.fi
|
||||
|
||||
@ -178,9 +178,6 @@ static void message_handler_req_lib_cpg_trackstop (void *conn,
|
||||
static void message_handler_req_lib_cpg_local_get (void *conn,
|
||||
const void *message);
|
||||
|
||||
static void message_handler_req_lib_cpg_groups_get (void *conn,
|
||||
const void *message);
|
||||
|
||||
static int cpg_node_joinleave_send (struct group_info *gi, struct process_info *pi, int fn, int reason);
|
||||
|
||||
static int cpg_exec_send_joinlist(void);
|
||||
@ -235,12 +232,6 @@ static struct corosync_lib_handler cpg_lib_engine[] =
|
||||
.response_size = sizeof (struct res_lib_cpg_local_get),
|
||||
.response_id = MESSAGE_RES_CPG_LOCAL_GET,
|
||||
.flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED
|
||||
},
|
||||
{ /* 7 */
|
||||
.lib_handler_fn = message_handler_req_lib_cpg_groups_get,
|
||||
.response_size = sizeof (struct res_lib_cpg_groups_get),
|
||||
.response_id = MESSAGE_RES_CPG_GROUPS_GET,
|
||||
.flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED
|
||||
}
|
||||
};
|
||||
|
||||
@ -506,20 +497,6 @@ static int cpg_lib_exit_fn (void *conn)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int count_groups(void)
|
||||
{
|
||||
struct list_head *iter;
|
||||
int num_groups = 0;
|
||||
uint32_t hash;
|
||||
|
||||
for (hash=0 ; hash < GROUP_HASH_SIZE; hash++) {
|
||||
for (iter = group_lists[hash].next; iter != &group_lists[hash]; iter = iter->next) {
|
||||
num_groups++;
|
||||
}
|
||||
}
|
||||
return num_groups;
|
||||
}
|
||||
|
||||
static struct group_info *get_group(const mar_cpg_name_t *name)
|
||||
{
|
||||
struct list_head *iter;
|
||||
@ -1227,17 +1204,3 @@ static void message_handler_req_lib_cpg_local_get (void *conn,
|
||||
api->ipc_response_send(conn, &res_lib_cpg_local_get,
|
||||
sizeof(res_lib_cpg_local_get));
|
||||
}
|
||||
|
||||
static void message_handler_req_lib_cpg_groups_get (void *conn,
|
||||
const void *message)
|
||||
{
|
||||
struct res_lib_cpg_groups_get res_lib_cpg_groups_get;
|
||||
|
||||
res_lib_cpg_groups_get.header.size = sizeof(res_lib_cpg_groups_get);
|
||||
res_lib_cpg_groups_get.header.id = MESSAGE_RES_CPG_GROUPS_GET;
|
||||
res_lib_cpg_groups_get.header.error = CS_OK;
|
||||
res_lib_cpg_groups_get.num_groups = count_groups();
|
||||
|
||||
api->ipc_response_send(conn, &res_lib_cpg_groups_get,
|
||||
sizeof(res_lib_cpg_groups_get));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user