Patch to remove unused or by Steve unwanted functions message_handler_req_lib_cpg_groups_get and related things.
commit ea17f0463b81378db123996ea8e33420c9c273ca Author: Jan Friesse <[email protected]> Date: Tue Apr 21 14:22:55 2009 +0200 CPG - Remove MESSAGE_REQ_CPG_GROUPS_GET. diff --git a/include/corosync/cpg.h b/include/corosync/cpg.h index 8093dfb..86cf78d 100644 --- a/include/corosync/cpg.h +++ b/include/corosync/cpg.h @@ -104,7 +104,6 @@ typedef void (*cpg_groups_get_fn_t) ( 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 +189,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); diff --git a/include/corosync/ipc_cpg.h b/include/corosync/ipc_cpg.h index 4f175e9..5c9adb0 100644 --- a/include/corosync/ipc_cpg.h +++ b/include/corosync/ipc_cpg.h @@ -46,8 +46,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 { @@ -61,9 +60,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 { @@ -165,22 +162,4 @@ struct res_lib_cpg_leave { mar_res_header_t header __attribute__((aligned(8))); }; -struct req_lib_cpg_groups_get { - mar_req_header_t header __attribute__((aligned(8))); -}; - -struct res_lib_cpg_groups_get { - mar_res_header_t header __attribute__((aligned(8))); - mar_uint32_t num_groups __attribute__((aligned(8))); -}; - -struct res_lib_cpg_groups_get_callback { - mar_res_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 */ diff --git a/man/cpg_initialize.3 b/man/cpg_initialize.3 index e48c154..724deb2 100644 --- a/man/cpg_initialize.3 +++ b/man/cpg_initialize.3 @@ -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 @@ -168,5 +160,4 @@ The errors are undocumented. .BR cpg_leave (3), .BR cpg_mcast_joined (3), .BR cpg_membership_get (3) -.BR cpg_groups_get (3) .PP diff --git a/services/cpg.c b/services/cpg.c index fdcdfc7..88a3adf 100644 --- a/services/cpg.c +++ b/services/cpg.c @@ -176,9 +176,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); @@ -233,12 +230,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 } }; @@ -504,20 +495,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; @@ -1225,17 +1202,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)); -}
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
