From 26f4f33b22591981f42afdf625b91ab79b19c964 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 22 Feb 2009 20:54:33 +0000 Subject: [PATCH] - 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 --- checkin_notes | 9 +++++++++ client/cs_files.cpp | 4 ++++ client/file_xfer.cpp | 2 +- client/pers_file_xfer.cpp | 4 ++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 76963e01c1..37abb8e3e3 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/cs_files.cpp b/client/cs_files.cpp index fb9d320937..f761f4e83d 100644 --- a/client/cs_files.cpp +++ b/client/cs_files.cpp @@ -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; } diff --git a/client/file_xfer.cpp b/client/file_xfer.cpp index 20d033e198..fb146bec0e 100644 --- a/client/file_xfer.cpp +++ b/client/file_xfer.cpp @@ -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 ); diff --git a/client/pers_file_xfer.cpp b/client/pers_file_xfer.cpp index f40b872b11..81118564f0 100644 --- a/client/pers_file_xfer.cpp +++ b/client/pers_file_xfer.cpp @@ -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 );