43 #include <sys/types.h>
44 #include <sys/socket.h>
48 #include <qb/qbipcc.h>
59 qb_ipcc_connection_t *
c;
69 static void quorum_inst_free (
void *inst);
76 uint32_t *quorum_type)
94 uint32_t *quorum_type,
100 struct qb_ipc_request_header quorum_gettype_req;
104 uint32_t local_quorum_type;
108 goto error_no_destroy;
112 if (error !=
CS_OK) {
113 goto error_no_destroy;
117 if (error !=
CS_OK) {
126 goto error_put_destroy;
131 quorum_gettype_req.size =
sizeof (quorum_gettype_req);
134 iov.iov_base = (
char *)&quorum_gettype_req;
135 iov.iov_len =
sizeof (quorum_gettype_req);
144 if (error !=
CS_OK) {
145 goto error_put_destroy;
151 quorum_model_gettype_req.header.size =
sizeof (quorum_model_gettype_req);
153 quorum_model_gettype_req.model = model;
155 iov.iov_base = (
char *)&quorum_model_gettype_req;
156 iov.iov_len =
sizeof (quorum_model_gettype_req);
165 if (error !=
CS_OK) {
166 goto error_put_destroy;
173 if (quorum_type != NULL) {
174 *quorum_type = local_quorum_type;
177 if (model_data != NULL) {
191 (void)hdb_handle_put (&quorum_handle_t_db, *handle);
196 (void)hdb_handle_put (&quorum_handle_t_db, *handle);
198 (void)hdb_handle_destroy (&quorum_handle_t_db, *handle);
203 static void quorum_inst_free (
void *inst)
216 if (error !=
CS_OK) {
224 (void)hdb_handle_put (&quorum_handle_t_db, handle);
230 (void)hdb_handle_destroy (&quorum_handle_t_db, handle);
232 (void)hdb_handle_put (&quorum_handle_t_db, handle);
244 struct qb_ipc_request_header req;
248 if (error !=
CS_OK) {
252 req.size =
sizeof (req);
255 iov.iov_base = (
char *)&req;
256 iov.iov_len =
sizeof (req);
265 if (error !=
CS_OK) {
274 (void)hdb_handle_put (&quorum_handle_t_db, handle);
287 if (error !=
CS_OK) {
293 (void)hdb_handle_put (&quorum_handle_t_db, handle);
307 if (error !=
CS_OK) {
313 (void)hdb_handle_put (&quorum_handle_t_db, handle);
326 if (error !=
CS_OK) {
332 (void)hdb_handle_put (&quorum_handle_t_db, handle);
346 struct qb_ipc_response_header res;
349 if (error !=
CS_OK) {
367 if (error !=
CS_OK) {
374 (void)hdb_handle_put (&quorum_handle_t_db, handle);
385 struct qb_ipc_request_header req;
386 struct qb_ipc_response_header res;
389 if (error !=
CS_OK) {
393 req.size =
sizeof (req);
396 iov.iov_base = (
char *)&req;
397 iov.iov_len =
sizeof (req);
406 if (error !=
CS_OK) {
413 (void)hdb_handle_put (&quorum_handle_t_db, handle);
427 struct qb_ipc_response_header *dispatch_data;
446 if (error !=
CS_OK) {
458 dispatch_data = (
struct qb_ipc_response_header *)dispatch_buf;
483 if (error !=
CS_OK) {
492 memcpy (&quorum_inst_copy,
quorum_inst,
sizeof(quorum_inst_copy));
498 switch (dispatch_data->id) {
521 switch (dispatch_data->id) {
550 left_list = joined_list +
586 (void)hdb_handle_put (&quorum_handle_t_db, handle);