mirror of https://github.com/BOINC/boinc.git
- file upload handler: if client-reported offset is less than file size,
don't just print an error message; lseek() back to the offset point. Otherwise we can end up with duplication in the file. svn path=/trunk/boinc/; revision=23041
This commit is contained in:
parent
5421335dbb
commit
d4df1871d5
|
@ -789,3 +789,11 @@ David 15 Feb 2011
|
|||
transitioner.cpp
|
||||
sched_resend.cpp
|
||||
|
||||
David 15 Feb 2011
|
||||
- file upload handler: if client-reported offset is less than file size,
|
||||
don't just print an error message;
|
||||
lseek() back to the offset point.
|
||||
Otherwise we can end up with duplication in the file.
|
||||
|
||||
sched/
|
||||
file_upload_handler.cpp
|
||||
|
|
|
@ -196,6 +196,7 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
|
|||
);
|
||||
}
|
||||
if (sbuf.st_size > offset) {
|
||||
lseek(fd, offset, SEEK_SET);
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"file %s length on disk %d bytes; host upload starting at %.0f bytes.\n",
|
||||
this_filename, (int)sbuf.st_size, offset
|
||||
|
|
Loading…
Reference in New Issue