From 43694a92f5521537109f14ec5fb9c8f4b2a821f6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 2 Nov 2008 18:40:11 +0100 Subject: network: remove message omission test-code This patch removes a part of the code that can be used to simulate message loss in the replication. This was useful to test the FT-FW code. However, this code is not useful anymore as long as we have netem: tc qdisc add dev eth0 root netem loss 0.1% Signed-off-by: Pablo Neira Ayuso --- src/network.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/network.c b/src/network.c index fb6ea90..7d1d9fa 100644 --- a/src/network.c +++ b/src/network.c @@ -31,19 +31,6 @@ static size_t __do_send(struct mcast_sock *m, void *data, size_t len) { struct nethdr *net = data; -#undef _TEST_DROP -#ifdef _TEST_DROP - -#define DROP_RATE .25 - - /* simulate message omission with a certain probability */ - if ((random() & 0x7FFFFFFF) < 0x80000000 * DROP_RATE) { - printf("drop sq: %u fl:%u len:%u\n", - ntohl(net->seq), ntohs(net->flags), - ntohs(net->len)); - return 0; - } -#endif debug("send sq: %u fl:%u len:%u\n", ntohl(net->seq), ntohs(net->flags), ntohs(net->len)); -- cgit v1.2.3