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

Remove random dropping of packets in released version.

(Logical change 1.118)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@421 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 лет назад
Родитель
Сommit
6d4bd5b8ff
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      exec/totemsrp.c

+ 4 - 0
exec/totemsrp.c

@@ -2579,9 +2579,11 @@ printf ("OTHERS %0.4f ms\n", ((float)tv_diff.tv_usec) / 100.0);
 	my_token_held = 1;
 	my_do_delivery = 0;
 
+#ifdef DROP_RANDOM
 if (random () % 100 < 10) {
 	return (0);
 }
+#endif
 	/*
 	 * Hold onto token when there is no activity on ring and
 	 * this processor is the ring rep
@@ -2887,9 +2889,11 @@ static int message_handler_mcast (
 	}
 
 	assert (bytes_received < PACKET_SIZE_MAX);
+#ifdef DROP_RANDOM
 if (random()%100 < 20) {
 	return (0);
 }
+#endif
 	cancel_token_retransmit_timeout (); // REVIEWED
 
 	/*