Просмотр исходного кода

totempg: use iovec[i].iov_len instead of copy_len

To be more explicit that we are copying whole message.

Related to 0ebae6b47d39940c62dcbd9185b9af2f265a47ff.

Signed-off-by: Rytis Karpuška <rytisk@neurotechnology.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 899cb299831fea479ca8bc64d99fb1fce215d795)
Rytis Karpuška 8 лет назад
Родитель
Сommit
54f1f1bdbf
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      exec/totempg.c

+ 3 - 3
exec/totempg.c

@@ -919,9 +919,9 @@ static int mcast_msg (
 			(max_packet_size - sizeof (unsigned short))) {
 			(max_packet_size - sizeof (unsigned short))) {
 
 
 			memcpy (&fragmentation_data[fragment_size],
 			memcpy (&fragmentation_data[fragment_size],
-				(char *)iovec[i].iov_base + copy_base, copy_len);
-			fragment_size += copy_len;
-			mcast_packed_msg_lens[mcast_packed_msg_count] += copy_len;
+				(char *)iovec[i].iov_base + copy_base, iovec[i].iov_len);
+			fragment_size += iovec[i].iov_len;
+			mcast_packed_msg_lens[mcast_packed_msg_count] += iovec[i].iov_len;
 			next_fragment = 1;
 			next_fragment = 1;
 			copy_len = 0;
 			copy_len = 0;
 			copy_base = 0;
 			copy_base = 0;