| 1202 | |
| 1203 | |
| 1204 | cs_error_t cpg_mcast_joined ( |
| 1205 | cpg_handle_t handle, |
| 1206 | cpg_guarantee_t guarantee, |
| 1207 | const struct iovec *iovec, |
| 1208 | unsigned int iov_len) |
| 1209 | { |
| 1210 | int i; |
| 1211 | cs_error_t error; |
| 1212 | struct cpg_inst *cpg_inst; |
| 1213 | struct iovec iov[64]; |
| 1214 | struct req_lib_cpg_mcast req_lib_cpg_mcast; |
| 1215 | size_t msg_len = 0; |
| 1216 | |
| 1217 | error = hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (void *)&cpg_inst)); |
| 1218 | if (error != CS_OK) { |
| 1219 | return (error); |
| 1220 | } |
| 1221 | |
| 1222 | for (i = 0; i < iov_len; i++ ) { |
| 1223 | msg_len += iovec[i].iov_len; |
| 1224 | } |
| 1225 | |
| 1226 | if (msg_len > cpg_inst->max_msg_size) { |
| 1227 | error = send_fragments(cpg_inst, guarantee, msg_len, iovec, iov_len); |
| 1228 | goto error_exit; |
| 1229 | } |
| 1230 | |
| 1231 | req_lib_cpg_mcast.header.size = sizeof (struct req_lib_cpg_mcast) + |
| 1232 | msg_len; |
| 1233 | |
| 1234 | req_lib_cpg_mcast.header.id = MESSAGE_REQ_CPG_MCAST; |
| 1235 | req_lib_cpg_mcast.guarantee = guarantee; |
| 1236 | req_lib_cpg_mcast.msglen = msg_len; |
| 1237 | |
| 1238 | iov[0].iov_base = (void *)&req_lib_cpg_mcast; |
| 1239 | iov[0].iov_len = sizeof (struct req_lib_cpg_mcast); |
| 1240 | memcpy (&iov[1], iovec, iov_len * sizeof (struct iovec)); |
| 1241 | |
| 1242 | qb_ipcc_fc_enable_max_set(cpg_inst->c, 2); |
| 1243 | error = qb_to_cs_error(qb_ipcc_sendv(cpg_inst->c, iov, iov_len + 1)); |
| 1244 | qb_ipcc_fc_enable_max_set(cpg_inst->c, 1); |
| 1245 | |
| 1246 | error_exit: |
| 1247 | hdb_handle_put (&cpg_handle_t_db, handle); |
| 1248 | |
| 1249 | return (error); |
| 1250 | } |
| 1251 | |
| 1252 | cs_error_t cpg_iteration_initialize( |
| 1253 | cpg_handle_t handle, |