Search
j0ke.net Open Build Service
>
Projects
>
GFS
:
experimental
>
openais
> revision-1416.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File revision-1416.patch of Package openais (Revision 1)
Currently displaying revision
1
,
show latest
Index: exec/totemsrp.c =================================================================== --- exec/totemsrp.c (revision 1415) +++ exec/totemsrp.c (revision 1416) @@ -3385,9 +3385,10 @@ struct sort_queue_item *sort_queue_item_p; unsigned int i; int res; - struct mcast *mcast; + struct mcast *mcast_in; + struct mcast mcast_header; unsigned int range = 0; - int endian_conversion_required = 0 ; + int endian_conversion_required; unsigned int my_high_delivered_stored = 0; @@ -3435,19 +3436,28 @@ sort_queue_item_p = ptr; - mcast = sort_queue_item_p->iovec[0].iov_base; - assert (mcast != (struct mcast *)0xdeadbeef); + mcast_in = sort_queue_item_p->iovec[0].iov_base; + assert (mcast_in != (struct mcast *)0xdeadbeef); + endian_conversion_required = 0; + if (mcast_in->header.endian_detector != ENDIAN_LOCAL) { + endian_conversion_required = 1; + mcast_endian_convert (mcast_in, &mcast_header); + } else { + memcpy (&mcast_header, mcast_in, sizeof (struct mcast)); + } + /* * Skip messages not originated in instance->my_deliver_memb */ if (skip && - memb_set_subset (&mcast->system_from, + memb_set_subset (&mcast_header.system_from, 1, instance->my_deliver_memb_list, instance->my_deliver_memb_entries) == 0) { - instance->my_high_delivered = my_high_delivered_stored + i; + instance->my_high_delivered = my_high_delivered_stored + i; + continue; } @@ -3456,20 +3466,15 @@ */ log_printf (instance->totemsrp_log_level_debug, "Delivering MCAST message with seq %x to pending delivery queue\n", - mcast->seq); + mcast_header.seq); - if (mcast->header.endian_detector != ENDIAN_LOCAL) { - endian_conversion_required = 1; - mcast_endian_convert (mcast, mcast); - } - /* * Message is locally originated multicast */ if (sort_queue_item_p->iov_len > 1 && sort_queue_item_p->iovec[0].iov_len == sizeof (struct mcast)) { instance->totemsrp_deliver_fn ( - mcast->header.nodeid, + mcast_header.header.nodeid, &sort_queue_item_p->iovec[1], sort_queue_item_p->iov_len - 1, endian_conversion_required); @@ -3478,7 +3483,7 @@ sort_queue_item_p->iovec[0].iov_base += sizeof (struct mcast); instance->totemsrp_deliver_fn ( - mcast->header.nodeid, + mcast_header.header.nodeid, sort_queue_item_p->iovec, sort_queue_item_p->iov_len, endian_conversion_required);