From 2fac65d17235c9dd24447c7e59863cb152118828 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Mon, 4 Oct 2010 00:55:19 +0200 Subject: [PATCH] dda_queue.c: restart XON/XOFF only if the queue is at least half drained. --- dda_queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dda_queue.c b/dda_queue.c index c4b1b85..ab905fc 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -108,8 +108,9 @@ void next_move() { } #ifdef XONXOFF - // restart transmission - xon(); + // restart transmission if the move buffer is only half full + if (((mb_tail - mb_head - 1) & (MOVEBUFFER_SIZE - 1)) > (MOVEBUFFER_SIZE / 2)) + xon(); #endif }