From 8c0b5a28b9d5b1f0154e0c8cbd5aba9eee132050 Mon Sep 17 00:00:00 2001 From: Walt Gribben Date: Thu, 23 Feb 2006 20:37:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9540 --- checkin_notes | 7 +++++++ client/pers_file_xfer.C | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/checkin_notes b/checkin_notes index 5d5d5e3c8d..012d98b896 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2278,3 +2278,10 @@ Rom 22 Feb 2006 Rom 23 Feb 2006 (HEAD) - Tag for 5.3.20 release, all platforms boinc_core_release_5_3_20 + +Walt 23 Feb 2006 + - Bug Fix: last_bytes_xferred was only counting the current bytes transferrred + on uploads. + + client/ + pers_file_xfer.C diff --git a/client/pers_file_xfer.C b/client/pers_file_xfer.C index 7195b69bf4..cc16d2d16e 100644 --- a/client/pers_file_xfer.C +++ b/client/pers_file_xfer.C @@ -185,6 +185,9 @@ bool PERS_FILE_XFER::poll() { // copy bytes_xferred for use in GUI last_bytes_xferred = fxp->bytes_xferred; + if (fxp->is_upload) { + last_bytes_xferred += fxp->file_offset; + } // don't count suspended periods in total time // @@ -441,6 +444,9 @@ int PERS_FILE_XFER::write(MIOFILE& fout) { void PERS_FILE_XFER::suspend() { if (fxp) { last_bytes_xferred = fxp->bytes_xferred; // save bytes transferred + if (fxp->is_upload) { + last_bytes_xferred += fxp->file_offset; + } gstate.file_xfers->remove(fxp); // this removes from http_op_set too delete fxp; fxp = 0;