From 84dba9c5bbd99cb80c0e201bbffa27a51766c63f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 10 Jan 2011 12:51:44 +0100 Subject: tftp: fix bad interaction betweel poll() and alarm(). Closes bug 3061 This was breaking timeout handling. function old new delta tftp_progress_update - 45 +45 tftp_progress_done - 32 +32 tftp_protocol 1839 1858 +19 tftp_progress_init 9 15 +6 tftp_main 298 286 -12 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/1 up/down: 102/-12) Total: 90 bytes Signed-off-by: Denys Vlasenko --- libbb/progress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb/progress.c') diff --git a/libbb/progress.c b/libbb/progress.c index 4c2763c53..74e80a39e 100644 --- a/libbb/progress.c +++ b/libbb/progress.c @@ -78,7 +78,7 @@ void FAST_FUNC bb_progress_update(bb_progress_t *p, /* Do not update on every call * (we can be called on every network read!) */ if (since_last_update == 0 && !totalsize) - return; + return; beg_and_transferred = beg_range + transferred; ratio = 100; -- cgit v1.2.3