File revision-1478.patch of Package openais (Revision 6baee3fd2f5ca2572d3568906f70102e)
Currently displaying revision 6baee3fd2f5ca2572d3568906f70102e, show latest
x
1
Index: exec/totemsrp.c
2
===================================================================
3
--- exec/totemsrp.c (revision 1477)
4
+++ exec/totemsrp.c (revision 1478)
5
6
// TODO LEAK
7
message_item.mcast = malloc (sizeof (struct mcast));
8
assert (message_item.mcast);
9
- memcpy (message_item.mcast, sort_queue_item->iovec[0].iov_base,
10
- sizeof (struct mcast));
11
- memcpy (&message_item.mcast->ring_id, &instance->my_ring_id,
12
- sizeof (struct memb_ring_id));
13
+ message_item.mcast->header.type = MESSAGE_TYPE_MCAST;
14
+ srp_addr_copy (&message_item.mcast->system_from, &instance->my_id);
15
message_item.mcast->header.encapsulated = MESSAGE_ENCAPSULATED;
16
message_item.mcast->header.nodeid = instance->my_id.addr[0].nodeid;
17
+ assert (message_item.mcast->header.nodeid);
18
message_item.mcast->header.endian_detector = ENDIAN_LOCAL;
19
- assert (message_item.mcast->header.nodeid);
20
+ memcpy (&message_item.mcast->ring_id, &instance->my_ring_id,
21
+ sizeof (struct memb_ring_id));
22
message_item.iov_len = sort_queue_item->iov_len;
23
memcpy (&message_item.iovec, &sort_queue_item->iovec,
24
sizeof (struct iovec) * sort_queue_item->iov_len);
25