Signed-off-by: Angus Salkeld <asalk...@redhat.com>
---
 include/corosync/corotypes.h |    1 +
 lib/cfg.c                    |   28 +++++++++++++---------------
 lib/confdb.c                 |   40 ++++++++++++++++++++--------------------
 lib/cpg.c                    |    4 ++--
 lib/evs.c                    |   10 +++++-----
 lib/pload.c                  |    2 +-
 lib/quorum.c                 |    6 +++---
 lib/votequorum.c             |   22 +++++++++++-----------
 8 files changed, 56 insertions(+), 57 deletions(-)

diff --git a/include/corosync/corotypes.h b/include/corosync/corotypes.h
index 394ff7b..9f6259b 100644
--- a/include/corosync/corotypes.h
+++ b/include/corosync/corotypes.h
@@ -157,6 +157,7 @@ static inline cs_error_t qb_to_cs_error (int result)
                err = CS_ERR_FAILED_OPERATION;
                break;
        case ETIME:
+       case ETIMEDOUT:
                err = CS_ERR_TIMEOUT;
                break;
        case EINVAL:
diff --git a/lib/cfg.c b/lib/cfg.c
index cdc9831..0855e1b 100644
--- a/lib/cfg.c
+++ b/lib/cfg.c
@@ -289,7 +289,7 @@ corosync_cfg_ring_status_get (
                &iov,
                1,
                &res_lib_cfg_ringstatusget,
-               sizeof (struct res_lib_cfg_ringstatusget)));
+               sizeof (struct res_lib_cfg_ringstatusget), -1));
 
        *interface_count = res_lib_cfg_ringstatusget.interface_count;
        *interface_names = malloc (sizeof (char *) * *interface_count);
@@ -369,7 +369,7 @@ corosync_cfg_ring_reenable (
                &iov,
                1,
                &res_lib_cfg_ringreenable,
-               sizeof (struct res_lib_cfg_ringreenable)));
+               sizeof (struct res_lib_cfg_ringreenable), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -408,7 +408,7 @@ corosync_cfg_service_load (
                &iov,
                1,
                &res_lib_cfg_serviceload,
-               sizeof (struct res_lib_cfg_serviceload)));
+               sizeof (struct res_lib_cfg_serviceload), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -447,7 +447,7 @@ corosync_cfg_service_unload (
                &iov,
                1,
                &res_lib_cfg_serviceunload,
-               sizeof (struct res_lib_cfg_serviceunload)));
+               sizeof (struct res_lib_cfg_serviceunload), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -483,7 +483,7 @@ corosync_cfg_state_track (
                &iov,
                1,
                &res_lib_cfg_statetrack,
-               sizeof (struct res_lib_cfg_statetrack)));
+               sizeof (struct res_lib_cfg_statetrack), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -516,7 +516,7 @@ corosync_cfg_state_track_stop (
                &iov,
                1,
                &res_lib_cfg_statetrackstop,
-               sizeof (struct res_lib_cfg_statetrackstop)));
+               sizeof (struct res_lib_cfg_statetrackstop), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -557,7 +557,7 @@ corosync_cfg_kill_node (
                &iov,
                1,
                &res_lib_cfg_killnode,
-               sizeof (struct res_lib_cfg_killnode)));
+               sizeof (struct res_lib_cfg_killnode), -1));
 
        error = res_lib_cfg_killnode.header.error;
 
@@ -594,7 +594,7 @@ corosync_cfg_try_shutdown (
                &iov,
                1,
                &res_lib_cfg_tryshutdown,
-               sizeof (struct res_lib_cfg_tryshutdown)));
+               sizeof (struct res_lib_cfg_tryshutdown), -1));
 
        (void)hdb_handle_put (&cfg_hdb, cfg_handle);
 
@@ -629,7 +629,7 @@ corosync_cfg_replyto_shutdown (
                &iov,
                1,
                &res_lib_cfg_replytoshutdown,
-               sizeof (struct res_lib_cfg_replytoshutdown)));
+               sizeof (struct res_lib_cfg_replytoshutdown), -1));
 
        return (error);
 }
@@ -665,10 +665,8 @@ cs_error_t corosync_cfg_get_node_addrs (
 
        error = qb_to_cs_error (qb_ipcc_sendv_recv (
                cfg_inst->c,
-               &iov,
-               1,
-               response_buf,
-               IPC_RESPONSE_SIZE));
+               &iov, 1,
+               response_buf, IPC_RESPONSE_SIZE, -1));
        res_lib_cfg_get_node_addrs = (struct res_lib_cfg_get_node_addrs 
*)response_buf;
 
        if (error != CS_OK) {
@@ -732,7 +730,7 @@ cs_error_t corosync_cfg_local_get (
                &iov,
                1,
                &res_lib_cfg_local_get,
-               sizeof (struct res_lib_cfg_local_get)));
+               sizeof (struct res_lib_cfg_local_get), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -776,7 +774,7 @@ corosync_cfg_crypto_set (
                &iov,
                1,
                &res_lib_cfg_crypto_set,
-               sizeof (struct res_lib_cfg_crypto_set)));
+               sizeof (struct res_lib_cfg_crypto_set), -1));
 
        if (error == CS_OK)
                error = res_lib_cfg_crypto_set.header.error;
diff --git a/lib/confdb.c b/lib/confdb.c
index ffa1876..f50233a 100644
--- a/lib/confdb.c
+++ b/lib/confdb.c
@@ -457,7 +457,7 @@ cs_error_t confdb_object_create (
                &iov,
                1,
                 &res_lib_confdb_object_create,
-               sizeof (struct res_lib_confdb_object_create)));
+               sizeof (struct res_lib_confdb_object_create), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -507,7 +507,7 @@ cs_error_t confdb_object_destroy (
                &iov,
                1,
                 &res,
-               sizeof (struct qb_ipc_response_header)));
+               sizeof (struct qb_ipc_response_header), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -557,7 +557,7 @@ cs_error_t confdb_object_parent_get (
                &iov,
                1,
                 &res_lib_confdb_object_parent_get,
-               sizeof (struct res_lib_confdb_object_parent_get)));
+               sizeof (struct res_lib_confdb_object_parent_get), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -604,7 +604,7 @@ static cs_error_t do_find_destroy(
                &iov,
                1,
                 &res,
-               sizeof (struct qb_ipc_response_header)));
+               sizeof (struct qb_ipc_response_header), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -711,7 +711,7 @@ cs_error_t confdb_key_create (
                &iov,
                1,
                 &res,
-               sizeof (res)));
+               sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -771,7 +771,7 @@ cs_error_t confdb_key_create_typed (
                &iov,
                1,
                &res,
-               sizeof (res)));
+               sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -832,7 +832,7 @@ cs_error_t confdb_key_delete (
                &iov,
                1,
                 &res,
-               sizeof (res)));
+               sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -889,7 +889,7 @@ cs_error_t confdb_key_get (
                &iov,
                1,
                 &res_lib_confdb_key_get,
-               sizeof (struct res_lib_confdb_key_get)));
+               sizeof (struct res_lib_confdb_key_get), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -950,7 +950,7 @@ cs_error_t confdb_key_get_typed (
                &iov,
                1,
                &response,
-               sizeof (struct res_lib_confdb_key_get_typed)));
+               sizeof (struct res_lib_confdb_key_get_typed), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1012,7 +1012,7 @@ cs_error_t confdb_key_increment (
                &iov,
                1,
                 &res_lib_confdb_key_incdec,
-               sizeof (struct res_lib_confdb_key_incdec)));
+               sizeof (struct res_lib_confdb_key_incdec), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1071,7 +1071,7 @@ cs_error_t confdb_key_decrement (
                &iov,
                1,
                 &res_lib_confdb_key_incdec,
-               sizeof (struct res_lib_confdb_key_incdec)));
+               sizeof (struct res_lib_confdb_key_incdec), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1137,7 +1137,7 @@ cs_error_t confdb_key_replace (
                &iov,
                1,
                 &res,
-               sizeof (res)));
+               sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1309,7 +1309,7 @@ cs_error_t confdb_object_find (
                &iov,
                1,
                 &res_lib_confdb_object_find,
-               sizeof (struct res_lib_confdb_object_find)));
+               sizeof (struct res_lib_confdb_object_find), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1378,7 +1378,7 @@ cs_error_t confdb_object_iter (
                &iov,
                1,
                 &res_lib_confdb_object_iter,
-               sizeof (struct res_lib_confdb_object_iter)));
+               sizeof (struct res_lib_confdb_object_iter), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1450,7 +1450,7 @@ cs_error_t confdb_key_iter (
                &iov,
                1,
                 &res_lib_confdb_key_iter,
-               sizeof (struct res_lib_confdb_key_iter)));
+               sizeof (struct res_lib_confdb_key_iter), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1526,7 +1526,7 @@ cs_error_t confdb_key_iter_typed (
                &iov,
                1,
                &response,
-               sizeof (struct res_lib_confdb_key_iter_typed)));
+               sizeof (struct res_lib_confdb_key_iter_typed), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1586,7 +1586,7 @@ cs_error_t confdb_write (
                &iov,
                1,
                 &res_lib_confdb_write,
-               sizeof (struct res_lib_confdb_write)));
+               sizeof (struct res_lib_confdb_write), -1));
 
        if (error != CS_OK) {
                /* FIXME: set error_text */
@@ -1644,7 +1644,7 @@ cs_error_t confdb_reload (
                &iov,
                1,
                 &res_lib_confdb_reload,
-               sizeof (struct res_lib_confdb_reload)));
+               sizeof (struct res_lib_confdb_reload), -1));
 
        if (error != CS_OK) {
                /* FIXME: set error_text */
@@ -1698,7 +1698,7 @@ cs_error_t confdb_track_changes (
                &iov,
                1,
                 &res,
-               sizeof (struct qb_ipc_response_header)));
+               sizeof (struct qb_ipc_response_header), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -1741,7 +1741,7 @@ cs_error_t confdb_stop_track_changes (confdb_handle_t 
handle)
                &iov,
                1,
                 &res,
-               sizeof (struct qb_ipc_response_header)));
+               sizeof (struct qb_ipc_response_header), -1));
 
        if (error != CS_OK) {
                goto error_exit;
diff --git a/lib/cpg.c b/lib/cpg.c
index 560e04d..caf3efe 100644
--- a/lib/cpg.c
+++ b/lib/cpg.c
@@ -97,7 +97,7 @@ coroipcc_msg_send_reply_receive (
        void *res_msg,
        size_t res_len)
 {
-       return qb_to_cs_error(qb_ipcc_sendv_recv(c, iov, iov_len, res_msg, 
res_len));
+       return qb_to_cs_error(qb_ipcc_sendv_recv(c, iov, iov_len, res_msg, 
res_len, -1));
 }
 
 static void cpg_iteration_instance_finalize (struct cpg_iteration_instance_t 
*cpg_iteration_instance)
@@ -1073,7 +1073,7 @@ cs_error_t cpg_iteration_next(
 
        error = qb_to_cs_error (qb_ipcc_recv (cpg_iteration_instance->conn,
                                &res_lib_cpg_iterationnext,
-                               sizeof(struct res_lib_cpg_iterationnext)));
+                               sizeof(struct res_lib_cpg_iterationnext), -1));
        if (error != CS_OK) {
                goto error_put;
        }
diff --git a/lib/evs.c b/lib/evs.c
index 5b0e515..50a4e6d 100644
--- a/lib/evs.c
+++ b/lib/evs.c
@@ -350,7 +350,7 @@ evs_error_t evs_join (
        iov[1].iov_len = (group_entries * sizeof (struct evs_group));
 
        error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
-               &res_lib_evs_join, sizeof (struct res_lib_evs_join)));
+               &res_lib_evs_join, sizeof (struct res_lib_evs_join), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -391,7 +391,7 @@ evs_error_t evs_leave (
        iov[1].iov_len = (group_entries * sizeof (struct evs_group));
 
        error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
-               &res_lib_evs_leave, sizeof (struct res_lib_evs_leave)));
+               &res_lib_evs_leave, sizeof (struct res_lib_evs_leave), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -442,7 +442,7 @@ evs_error_t evs_mcast_joined (
        error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov,
                iov_len + 1,
                &res_lib_evs_mcast_joined,
-               sizeof (struct res_lib_evs_mcast_joined)));
+               sizeof (struct res_lib_evs_mcast_joined), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -495,7 +495,7 @@ evs_error_t evs_mcast_groups (
        error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov,
                iov_len + 2,
                &res_lib_evs_mcast_groups,
-               sizeof (struct res_lib_evs_mcast_groups)));
+               sizeof (struct res_lib_evs_mcast_groups), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -536,7 +536,7 @@ evs_error_t evs_membership_get (
                &iov,
                1,
                &res_lib_evs_membership_get,
-               sizeof (struct res_lib_evs_membership_get)));
+               sizeof (struct res_lib_evs_membership_get), -1));
 
        if (error != CS_OK) {
                goto error_exit;
diff --git a/lib/pload.c b/lib/pload.c
index 89fab10..8f41e72 100644
--- a/lib/pload.c
+++ b/lib/pload.c
@@ -185,7 +185,7 @@ unsigned int pload_start (
                &iov,
                1,
                &res_lib_pload_start,
-               sizeof (struct res_lib_pload_start)));
+               sizeof (struct res_lib_pload_start), -1));
 
        if (error != CS_OK) {
                goto error_exit;
diff --git a/lib/quorum.c b/lib/quorum.c
index 5daaf5d..94d748c 100644
--- a/lib/quorum.c
+++ b/lib/quorum.c
@@ -160,7 +160,7 @@ cs_error_t quorum_getquorate (
                &iov,
                1,
                &res_lib_quorum_getquorate,
-               sizeof (struct res_lib_quorum_getquorate)));
+               sizeof (struct res_lib_quorum_getquorate), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -262,7 +262,7 @@ cs_error_t quorum_trackstart (
                 &iov,
                 1,
                 &res,
-                sizeof (res)));
+                sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -301,7 +301,7 @@ cs_error_t quorum_trackstop (
                 &iov,
                 1,
                 &res,
-                sizeof (res)));
+                sizeof (res), -1));
 
        if (error != CS_OK) {
                goto error_exit;
diff --git a/lib/votequorum.c b/lib/votequorum.c
index cb4455e..5b42316 100644
--- a/lib/votequorum.c
+++ b/lib/votequorum.c
@@ -168,7 +168,7 @@ cs_error_t votequorum_getinfo (
                &iov,
                1,
                 &res_lib_votequorum_getinfo,
-               sizeof (struct res_lib_votequorum_getinfo)));
+               sizeof (struct res_lib_votequorum_getinfo), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -218,7 +218,7 @@ cs_error_t votequorum_setexpected (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -261,7 +261,7 @@ cs_error_t votequorum_setvotes (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -308,7 +308,7 @@ cs_error_t votequorum_qdisk_register (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -350,7 +350,7 @@ cs_error_t votequorum_qdisk_poll (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -389,7 +389,7 @@ cs_error_t votequorum_qdisk_unregister (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -432,7 +432,7 @@ cs_error_t votequorum_qdisk_getinfo (
                &iov,
                1,
                 &res_lib_votequorum_qdisk_getinfo,
-               sizeof (struct res_lib_votequorum_qdisk_getinfo)));
+               sizeof (struct res_lib_votequorum_qdisk_getinfo), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -476,7 +476,7 @@ cs_error_t votequorum_setstate (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -516,7 +516,7 @@ cs_error_t votequorum_leaving (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -559,7 +559,7 @@ cs_error_t votequorum_trackstart (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
@@ -598,7 +598,7 @@ cs_error_t votequorum_trackstop (
                &iov,
                1,
                 &res_lib_votequorum_status,
-               sizeof (struct res_lib_votequorum_status)));
+               sizeof (struct res_lib_votequorum_status), -1));
 
        if (error != CS_OK) {
                goto error_exit;
-- 
1.7.3.1

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to