always get file size

svn path=/trunk/boinc/; revision=9215
This commit is contained in:
David Anderson 2006-01-11 23:13:04 +00:00
parent adb1dd77b1
commit 5626aeb9d1
3 changed files with 16 additions and 9 deletions

View File

@ -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

View File

@ -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,

View File

@ -49,6 +49,8 @@
*
*/
#ifdef __ppc__
#include <mach-o/dyld.h>
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
@ -915,3 +917,5 @@ int MacBacktracePPCMachSelf(MacBTPPCAddr stackBottom, MacBTPPCAddr stackTop,
return MacBacktracePPCMach(mach_task_self(), myPC, mySP, stackBottom, stackTop, frameArray, frameArrayCount, frameCount, OSMinorVersion);
}
#endif