From 1d9949d72516653a85e7511654b037029be2fdf7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 28 Aug 1997 21:06:44 +0000 Subject: (ccache_read): Always update CC->max to something reasonable after a transfer. Use ports_self_interrupted to check for interrupts. --- ftpfs/ccache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftpfs/ccache.c b/ftpfs/ccache.c index 88299027..c942378a 100644 --- a/ftpfs/ccache.c +++ b/ftpfs/ccache.c @@ -164,12 +164,13 @@ ccache_read (struct ccache *cc, off_t offs, size_t len, void *data) } else { - cc->max += rd; cc->data_conn_pos += rd; + if (cc->data_conn_pos > cc->max) + cc->max = cc->data_conn_pos; } } - if (!err && hurd_check_cancel ()) + if (!err && ports_self_interrupted ()) err = EINTR; } -- cgit v1.2.3