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

Fix off by one calculation error resulting in assertion.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2398 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 16 лет назад
Родитель
Сommit
519616de0c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      exec/totempg.c

+ 2 - 2
exec/totempg.c

@@ -942,9 +942,9 @@ static int byte_count_send_ok (
 
 	avail = totemmrp_avail ();
 
-	msg_count = (byte_count / (totempg_totem_config->net_mtu - sizeof (struct totempg_mcast) - 16));
+	msg_count = (byte_count / (totempg_totem_config->net_mtu - sizeof (struct totempg_mcast) - 16)) + 1;
 
-	return (avail > msg_count);
+	return (avail >= msg_count);
 }
 
 static int send_reserve (