- client: zero PROJECT::last_upload_start on reset,

so that we can fetch work immediately
	- client: in PERS_FILE_XFER::create_xfer(),
		check for already-existing file before seeing we're allowed to start a new xfer
	- client: in PERS_FILE_XFER::create_xfer(),
		if an async verify is in progress, mark PERS_FILE_XFER as done.

svn path=/trunk/boinc/; revision=25243
This commit is contained in:
David Anderson 2012-02-13 05:02:51 +00:00
parent 9da40e98b3
commit 21d4a3d9c2
4 changed files with 26 additions and 7 deletions

View File

@ -1608,3 +1608,16 @@ Charlie 11 Feb 2012
clientgui/
BOINCGUIApp.cpp
David 12 Feb 2012
- client: zero PROJECT::last_upload_start on reset,
so that we can fetch work immediately
- client: in PERS_FILE_XFER::create_xfer(),
check for already-existing file before seeing we're allowed to start a new xfer
- client: in PERS_FILE_XFER::create_xfer(),
if an async verify is in progress, mark PERS_FILE_XFER as done.
client/
client_state.cpp
log_flags.cpp
pers_file_xfer.cpp

View File

@ -1750,6 +1750,7 @@ int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) {
i--;
}
}
project->last_upload_start = 0;
// if we're in the middle of a scheduler op to the project, abort it
//

View File

@ -70,6 +70,7 @@ void LOG_FLAGS::show() {
show_flag(buf, app_msg_receive, "app_msg_receive");
show_flag(buf, app_msg_send, "app_msg_send");
show_flag(buf, async_file_debug, "async_file_debug");
show_flag(buf, benchmark_debug, "benchmark_debug");
show_flag(buf, checkpoint_debug, "checkpoint_debug");
show_flag(buf, coproc_debug, "coproc_debug");

View File

@ -90,19 +90,14 @@ int PERS_FILE_XFER::create_xfer() {
FILE_XFER *file_xfer;
int retval;
// Decide whether to start a new file transfer
//
if (!gstate.start_new_file_xfer(*this)) {
return ERR_IDLE_PERIOD;
}
// if download, see if file already exists and is valid
//
if (!is_upload) {
char pathname[256];
get_pathname(fip, pathname, sizeof(pathname));
if (!fip->verify_file(true, false, true)) {
retval = fip->verify_file(true, false, true);
if (!retval) {
retval = fip->set_permissions();
fip->status = FILE_PRESENT;
pers_xfer_done = true;
@ -115,6 +110,9 @@ int PERS_FILE_XFER::create_xfer() {
}
return 0;
} else if (retval == ERR_IN_PROGRESS) {
pers_xfer_done = true;
return ERR_IN_PROGRESS;
} else {
// Mark file as not present but don't delete it.
// It might be partly downloaded.
@ -123,6 +121,12 @@ int PERS_FILE_XFER::create_xfer() {
}
}
// Decide whether to start a new file transfer
//
if (!gstate.start_new_file_xfer(*this)) {
return ERR_IDLE_PERIOD;
}
URL_LIST& ul = fip->get_url_list(is_upload);
file_xfer = new FILE_XFER;
fxp = file_xfer;