- client: print message if downloaded file has wrong size

- client: associate file xfer messages with a project; fixes #848

svn path=/trunk/boinc/; revision=17334
This commit is contained in:
David Anderson 2009-02-22 20:54:33 +00:00
parent 7001c6f7c5
commit 26f4f33b22
4 changed files with 16 additions and 3 deletions

View File

@ -1877,3 +1877,12 @@ David 21 Feb 2009
client/
work_fetch.cpp
David 22 Feb 2009
- client: print message if downloaded file has wrong size
- client: associate file xfer messages with a project; fixes #848
client/
cs_files.cpp
file_xfer.cpp
pers_file_xfer.cpp

View File

@ -152,6 +152,10 @@ int FILE_INFO::verify_file(bool strict, bool show_errors) {
}
if (nbytes && (nbytes != size) && (!config.dont_check_file_sizes)) {
msg_printf(project, MSG_INTERNAL_ERROR,
"File %s has wrong size: expected %.0f, got %.0f",
name, nbytes, size
);
status = ERR_WRONG_SIZE;
return ERR_WRONG_SIZE;
}

View File

@ -230,7 +230,7 @@ bool FILE_XFER_SET::poll() {
action = true;
fxp->file_xfer_done = true;
if (log_flags.file_xfer_debug) {
msg_printf(0, MSG_INFO,
msg_printf(fxp->fip->project, MSG_INFO,
"[file_xfer_debug] FILE_XFER_SET::poll(): http op done; retval %d\n",
fxp->http_op_retval
);

View File

@ -151,7 +151,7 @@ int PERS_FILE_XFER::create_xfer() {
);
}
if (log_flags.file_xfer_debug) {
msg_printf(0, MSG_INFO,
msg_printf(fip->project, MSG_INFO,
"[file_xfer_debug] URL: %s\n",
fip->get_current_url(is_upload)
);
@ -205,7 +205,7 @@ bool PERS_FILE_XFER::poll() {
if (fxp->file_xfer_done) {
if (log_flags.file_xfer_debug) {
msg_printf(0, MSG_INFO,
msg_printf(fip->project, MSG_INFO,
"[file_xfer_debug] file transfer status %d",
fxp->file_xfer_retval
);