diff --git a/lib/evs.c b/lib/evs.c index 7dc39af0..638b8018 100644 --- a/lib/evs.c +++ b/lib/evs.c @@ -472,7 +472,7 @@ evs_error_t evs_mcast_groups ( int i; evs_error_t error; struct evs_inst *evs_inst; - struct iovec iov[64]; + struct iovec iov[64]; /* FIXME: what if iov_len > 62 ? use malloc */ struct req_lib_evs_mcast_groups req_lib_evs_mcast_groups; struct res_lib_evs_mcast_groups res_lib_evs_mcast_groups; int msg_len = 0; diff --git a/services/pload.c b/services/pload.c index 6a72a955..52713c0e 100644 --- a/services/pload.c +++ b/services/pload.c @@ -263,7 +263,7 @@ static int send_message (enum totem_callback_token_type type, void *arg) struct req_exec_pload_mcast req_exec_pload_mcast; struct iovec iov[2]; unsigned int res; - int iov_len = 2; + int iov_len = 1; req_exec_pload_mcast.header.id = SERVICE_ID_MAKE (PLOAD_SERVICE, MESSAGE_REQ_EXEC_PLOAD_MCAST); @@ -271,10 +271,10 @@ static int send_message (enum totem_callback_token_type type, void *arg) iov[0].iov_base = &req_exec_pload_mcast; iov[0].iov_len = sizeof (struct req_exec_pload_mcast); - iov[1].iov_base = buffer; - iov[1].iov_len = msg_size - sizeof (struct req_exec_pload_mcast); - if (iov[1].iov_len < 0) { - iov_len = 1; + if (msg_size > sizeof (req_exec_pload_mcast)) { + iov[1].iov_base = buffer; + iov[1].iov_len = msg_size - sizeof (req_exec_pload_mcast); + iov_len = 2; } do {