mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=373
This commit is contained in:
parent
20de540177
commit
5fce72eebb
|
@ -644,9 +644,11 @@ bool CLIENT_STATE::garbage_collect() {
|
|||
} else {
|
||||
rp->wup->ref_cnt++;
|
||||
for (i=0; i<rp->output_files.size(); i++) {
|
||||
// If one of the file infos had a failure, mark the result
|
||||
// as done and report the error. The result, workunits, and
|
||||
// file infos will be cleaned up after the server is notified
|
||||
// If one of the file infos had a failure,
|
||||
// mark the result as done and report the error.
|
||||
// The result, workunits, and file infos
|
||||
// will be cleaned up after the server is notified
|
||||
//
|
||||
if (rp->output_files[i].file_info->had_failure()) {
|
||||
if (rp->state < RESULT_READY_TO_ACK) {
|
||||
rp->state = RESULT_READY_TO_ACK;
|
||||
|
|
|
@ -71,6 +71,7 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
|
|||
FILE_INFO* fip;
|
||||
unsigned int i;
|
||||
char path[256];
|
||||
int retval;
|
||||
|
||||
for (i=0; i<rp->output_files.size(); i++) {
|
||||
fip = rp->output_files[i].file_info;
|
||||
|
@ -79,7 +80,12 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
|
|||
fip->delete_file();
|
||||
} else {
|
||||
get_pathname(fip, path);
|
||||
md5_file(path, fip->md5_cksum, fip->nbytes);
|
||||
retval = md5_file(path, fip->md5_cksum, fip->nbytes);
|
||||
if (retval) {
|
||||
// an output file is unexpectedly absent.
|
||||
//
|
||||
fip->status = retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,21 +94,24 @@ bool CLIENT_STATE::handle_pers_file_xfers() {
|
|||
for (i=0; i<file_infos.size(); i++) {
|
||||
fip = file_infos[i];
|
||||
pfx = fip->pers_file_xfer;
|
||||
if (!fip->generated_locally && fip->status == FILE_NOT_PRESENT && !pfx) {
|
||||
// Set up the persistent file transfer object. This will start
|
||||
// the download when there is available bandwidth
|
||||
if (pfx) continue;
|
||||
if (!fip->generated_locally && fip->status == FILE_NOT_PRESENT) {
|
||||
|
||||
// Set up the persistent file transfer object.
|
||||
// This will start the download when there is available bandwidth
|
||||
//
|
||||
pfx = new PERS_FILE_XFER;
|
||||
pfx->init(fip, false);
|
||||
fip->pers_file_xfer = pfx;
|
||||
pers_xfers->insert( fip->pers_file_xfer );
|
||||
action = true;
|
||||
} else if (fip->upload_when_present && fip->status == FILE_PRESENT && !fip->uploaded && !pfx ) {
|
||||
// Set up the persistent file transfer object. This will start
|
||||
// the upload when there is available bandwidth
|
||||
} else if (fip->upload_when_present && fip->status == FILE_PRESENT && !fip->uploaded) {
|
||||
|
||||
// Set up the persistent file transfer object.
|
||||
// This will start the upload when there is available bandwidth
|
||||
//
|
||||
pfx = new PERS_FILE_XFER;
|
||||
pfx->init( fip, true );
|
||||
pfx->init(fip, true);
|
||||
fip->pers_file_xfer = pfx;
|
||||
pers_xfers->insert(fip->pers_file_xfer);
|
||||
action = true;
|
||||
|
@ -117,8 +120,10 @@ bool CLIENT_STATE::handle_pers_file_xfers() {
|
|||
|
||||
for (i=0; i<pers_xfers->pers_file_xfers.size(); i++) {
|
||||
pfx = pers_xfers->pers_file_xfers[i];
|
||||
|
||||
// If the transfer finished, remove the PERS_FILE_XFER object
|
||||
// from the set and delete it
|
||||
//
|
||||
if (pfx->xfer_done) {
|
||||
pfx->fip->pers_file_xfer = NULL;
|
||||
pers_xfers->remove(pfx);
|
||||
|
|
|
@ -292,7 +292,10 @@ int HTTP_OP::init_post2(
|
|||
strcpy(infile, in);
|
||||
file_offset = offset;
|
||||
retval = file_size(infile, content_length);
|
||||
if (retval) return retval;
|
||||
if (retval) {
|
||||
printf("HTTP::init_post2: couldn't get file size\n");
|
||||
return retval;
|
||||
}
|
||||
content_length -= (int)offset;
|
||||
}
|
||||
content_length += strlen(req1);
|
||||
|
|
Loading…
Reference in New Issue