| 715 | } |
| 716 | |
| 717 | cs_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 | |
| 753 | error_exit: |
| 754 | (void)hdb_handle_put (&cfg_hdb, handle); |
| 755 | |
| 756 | return (error); |
| 757 | } |
| 758 | |
| 759 | cs_error_t corosync_cfg_reload_config ( |
| 760 | corosync_cfg_handle_t handle) |