From 5626aeb9d18a874093b51e4d87b4d228607046ca Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 11 Jan 2006 23:13:04 +0000 Subject: [PATCH] always get file size svn path=/trunk/boinc/; revision=9215 --- checkin_notes | 12 ++++++++++++ client/file_xfer.C | 9 --------- lib/mac_backtrace.C | 4 ++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index ce067303b0..071da4a41b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -328,3 +328,15 @@ David 11 Jan 2006 client/ client_types.h cs_apps.C + +David 11 Jan 2006 + - core client: on file upload, always get file size (even if small file). + Before the file upload handler checkin earlier today, + this was actually a bug: + if a client had uploaded part of a small file and then failed, + it would never be able to upload the rest. + But it was probably a bad idea in the first place, + since 1 MB is a large file from the viewpoint of a modem user. + + client/ + file_xfer.C diff --git a/client/file_xfer.C b/client/file_xfer.C index e658696d0c..e7d6513f4d 100644 --- a/client/file_xfer.C +++ b/client/file_xfer.C @@ -79,15 +79,6 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) { is_upload = true; - // if the file is less than a MB, don't bother getting its size; - // just resent from the beginning - // - if (file_info.upload_offset < 0) { - if (file_info.nbytes < 1e6) { - file_info.upload_offset = 0; - } - } - if (file_info.upload_offset < 0) { bytes_xferred = 0; sprintf(header, diff --git a/lib/mac_backtrace.C b/lib/mac_backtrace.C index 4308c33bd1..8072aa9968 100644 --- a/lib/mac_backtrace.C +++ b/lib/mac_backtrace.C @@ -49,6 +49,8 @@ * */ +#ifdef __ppc__ + #include #include #include @@ -915,3 +917,5 @@ int MacBacktracePPCMachSelf(MacBTPPCAddr stackBottom, MacBTPPCAddr stackTop, return MacBacktracePPCMach(mach_task_self(), myPC, mySP, stackBottom, stackTop, frameArray, frameArrayCount, frameCount, OSMinorVersion); } + +#endif