MCPcopy Create free account
hub / github.com/corosync/corosync / cpg_mcast_joined

Function cpg_mcast_joined

lib/cpg.c:1204–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1202
1203
1204cs_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
1246error_exit:
1247 hdb_handle_put (&cpg_handle_t_db, handle);
1248
1249 return (error);
1250}
1251
1252cs_error_t cpg_iteration_initialize(
1253 cpg_handle_t handle,

Callers 8

mainFunction · 0.85
cpg_benchmarkFunction · 0.85
cpg_floodFunction · 0.85
cpg_testFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mcast_joinedFunction · 0.85

Calls 5

hdb_error_to_csFunction · 0.85
hdb_handle_getFunction · 0.85
send_fragmentsFunction · 0.85
qb_to_cs_errorFunction · 0.85
hdb_handle_putFunction · 0.85

Tested by 2

mainFunction · 0.68
mainFunction · 0.68