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

Function corosync_cfg_local_get

lib/cfg.c:717–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717cs_error_t corosync_cfg_local_get (
718 corosync_cfg_handle_t handle,
719 unsigned int *local_nodeid)
720{
721 cs_error_t error;
722 struct cfg_inst *cfg_inst;
723 struct iovec iov;
724 struct req_lib_cfg_local_get req_lib_cfg_local_get;
725 struct res_lib_cfg_local_get res_lib_cfg_local_get;
726
727 error = hdb_error_to_cs(hdb_handle_get (&cfg_hdb, handle, (void *)&cfg_inst));
728 if (error != CS_OK) {
729 return (error);
730 }
731
732 req_lib_cfg_local_get.header.size = sizeof (struct qb_ipc_request_header);
733 req_lib_cfg_local_get.header.id = MESSAGE_REQ_CFG_LOCAL_GET;
734
735 iov.iov_base = (void *)&req_lib_cfg_local_get;
736 iov.iov_len = sizeof (struct req_lib_cfg_local_get);
737
738 error = qb_to_cs_error (qb_ipcc_sendv_recv (
739 cfg_inst->c,
740 &iov,
741 1,
742 &res_lib_cfg_local_get,
743 sizeof (struct res_lib_cfg_local_get), CS_IPC_TIMEOUT_MS));
744
745 if (error != CS_OK) {
746 goto error_exit;
747 }
748
749 error = res_lib_cfg_local_get.header.error;
750
751 *local_nodeid = res_lib_cfg_local_get.local_nodeid;
752
753error_exit:
754 (void)hdb_handle_put (&cfg_hdb, handle);
755
756 return (error);
757}
758
759cs_error_t corosync_cfg_reload_config (
760 corosync_cfg_handle_t handle)

Callers 4

nodestatusget_doFunction · 0.85
_cs_local_node_info_getFunction · 0.85
mainFunction · 0.85
local_getFunction · 0.85

Calls 4

hdb_error_to_csFunction · 0.85
hdb_handle_getFunction · 0.85
qb_to_cs_errorFunction · 0.85
hdb_handle_putFunction · 0.85

Tested by 1

mainFunction · 0.68