MCPcopy Create free account
hub / github.com/corosync/corosync / cpg_local_get

Function cpg_local_get

lib/cpg.c:809–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807}
808
809cs_error_t cpg_local_get (
810 cpg_handle_t handle,
811 unsigned int *local_nodeid)
812{
813 cs_error_t error;
814 struct cpg_inst *cpg_inst;
815 struct iovec iov;
816 struct req_lib_cpg_local_get req_lib_cpg_local_get;
817 struct res_lib_cpg_local_get res_lib_cpg_local_get;
818
819 error = hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (void *)&cpg_inst));
820 if (error != CS_OK) {
821 return (error);
822 }
823
824 req_lib_cpg_local_get.header.size = sizeof (struct qb_ipc_request_header);
825 req_lib_cpg_local_get.header.id = MESSAGE_REQ_CPG_LOCAL_GET;
826
827 iov.iov_base = (void *)&req_lib_cpg_local_get;
828 iov.iov_len = sizeof (struct req_lib_cpg_local_get);
829
830 error = coroipcc_msg_send_reply_receive (cpg_inst->c, &iov, 1,
831 &res_lib_cpg_local_get, sizeof (res_lib_cpg_local_get));
832
833 if (error != CS_OK) {
834 goto error_exit;
835 }
836
837 error = res_lib_cpg_local_get.header.error;
838
839 *local_nodeid = res_lib_cpg_local_get.local_nodeid;
840
841error_exit:
842 hdb_handle_put (&cpg_handle_t_db, handle);
843
844 return (error);
845}
846
847cs_error_t cpg_flow_control_state_get (
848 cpg_handle_t handle,

Callers 7

mainFunction · 0.85
mainFunction · 0.85
ConfchgCallbackFunction · 0.85
print_localnodeidFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
local_getFunction · 0.85

Calls 4

hdb_error_to_csFunction · 0.85
hdb_handle_getFunction · 0.85
hdb_handle_putFunction · 0.85

Tested by 5

mainFunction · 0.68
ConfchgCallbackFunction · 0.68
print_localnodeidFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68