mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10747
This commit is contained in:
parent
e2f35a5d47
commit
a54b7162a0
|
@ -7958,6 +7958,7 @@ Charlie 24 July 2006
|
|||
macsnoozebadge.xpm (Added)
|
||||
macdisconnectbadge.xpm (Added)
|
||||
|
||||
|
||||
Rom 25 July 2006
|
||||
- Bug Fix: Mac compiler handles std::string a little differently than Windows.
|
||||
|
||||
|
@ -7987,3 +7988,25 @@ Charlie 25 July 2006
|
|||
sandbox.php
|
||||
mac_installer/
|
||||
Postinstall.cpp
|
||||
|
||||
David 25 July 2006
|
||||
core client fixes:
|
||||
- fix bug where interrupted downloads failed with checksum error.
|
||||
This was because we were comparing the HTTP status with 200.
|
||||
But partial transfer success is 206.
|
||||
(bug was introduced in June 28 checkin)
|
||||
- on startup, make sure that all files that are
|
||||
supposed to be present actually are.
|
||||
Otherwise set status to NOT_PRESENT,
|
||||
so that they'll be downloaded again.
|
||||
- on reset, clear project_files and user_files vectors
|
||||
- project files: parse and save md5 checksum.
|
||||
Note: this is a placeholder;
|
||||
I'll change it to full FILE_INFO later.
|
||||
|
||||
client/
|
||||
client_state.C,h
|
||||
client_types.C
|
||||
cs_files.C
|
||||
file_xfer.C
|
||||
http_curl.C
|
||||
|
|
|
@ -321,6 +321,8 @@ int CLIENT_STATE::init() {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
check_file_existence();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1232,6 +1234,9 @@ int CLIENT_STATE::reset_project(PROJECT* project) {
|
|||
}
|
||||
}
|
||||
|
||||
project->user_files.clear();
|
||||
project->project_files.clear();
|
||||
|
||||
garbage_collect_always();
|
||||
|
||||
// forcibly remove apps and app_versions
|
||||
|
|
|
@ -337,6 +337,7 @@ public:
|
|||
|
||||
// --------------- cs_files.C:
|
||||
public:
|
||||
void check_file_existence();
|
||||
bool start_new_file_xfer(PERS_FILE_XFER&);
|
||||
private:
|
||||
int make_project_dirs();
|
||||
|
|
|
@ -499,12 +499,13 @@ int PROJECT::parse_project_file(FILE* in) {
|
|||
if (parse_str(buf, "<url>", url, sizeof(url))) {
|
||||
finfo.urls.push_back(url);
|
||||
}
|
||||
if (parse_str(buf, "<md5_cksum>", finfo.md5_cksum, sizeof(finfo.md5_cksum))) continue;
|
||||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
void PROJECT::write_project_files(MIOFILE& f) {
|
||||
unsigned int i;
|
||||
unsigned int i, j;
|
||||
|
||||
if (!project_files.size()) return;
|
||||
f.printf("<project_files>\n");
|
||||
|
@ -514,11 +515,25 @@ void PROJECT::write_project_files(MIOFILE& f) {
|
|||
f.printf(
|
||||
" <file>\n"
|
||||
" <name>%s</name>\n"
|
||||
" <open_name>%s</open_name>\n"
|
||||
" </file>\n",
|
||||
" <open_name>%s</open_name>\n",
|
||||
fip->name,
|
||||
fref.open_name
|
||||
);
|
||||
if (strlen(fip->md5_cksum)) {
|
||||
f.printf(
|
||||
" <md5_cksum>%s</md5_cksum>\n",
|
||||
fip->md5_cksum
|
||||
);
|
||||
}
|
||||
for (j=0; j<fip->urls.size(); j++) {
|
||||
f.printf(
|
||||
" <url>%s</url>\n",
|
||||
fip->urls[j].c_str()
|
||||
);
|
||||
}
|
||||
f.printf(
|
||||
" </file>\n"
|
||||
);
|
||||
}
|
||||
f.printf("</project_files>\n");
|
||||
}
|
||||
|
@ -976,6 +991,8 @@ int FILE_INFO::merge_info(FILE_INFO& new_info) {
|
|||
//
|
||||
strcpy(file_signature, new_info.file_signature);
|
||||
|
||||
strcpy(md5_cksum, new_info.md5_cksum);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -294,5 +294,25 @@ bool CLIENT_STATE::handle_pers_file_xfers() {
|
|||
return action;
|
||||
}
|
||||
|
||||
// called at startup to ensure that if the core client
|
||||
// thinks a file is there, it's actually there
|
||||
//
|
||||
void CLIENT_STATE::check_file_existence() {
|
||||
unsigned int i;
|
||||
char path[1024];
|
||||
|
||||
for (i=0; i<file_infos.size(); i++) {
|
||||
FILE_INFO* fip = file_infos[i];
|
||||
if (fip->status == FILE_PRESENT) {
|
||||
get_pathname(fip, path);
|
||||
if (!boinc_file_exists(path)) {
|
||||
fip->status = FILE_NOT_PRESENT;
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"file %s not found", path
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char *BOINC_RCSID_66410b3cab = "$Id$";
|
||||
|
|
|
@ -272,7 +272,7 @@ bool FILE_XFER_SET::poll() {
|
|||
// deal with various error cases for downloads
|
||||
//
|
||||
if (!fxp->is_upload) {
|
||||
if (fxp->response == HTTP_STATUS_OK) {
|
||||
if (fxp->http_op_retval == 0) {
|
||||
// If no HTTP error,
|
||||
// see if we read less than 5 KB and file is incomplete.
|
||||
// If so truncate the amount read,
|
||||
|
|
|
@ -571,10 +571,12 @@ size_t libcurl_write(void *ptr, size_t size, size_t nmemb, HTTP_OP* phop) {
|
|||
// take the stream param as a FILE* and write to disk
|
||||
//CMC TODO: maybe assert stRead == size*nmemb, add exception handling on phop members
|
||||
size_t stWrite = fwrite(ptr, size, nmemb, (FILE*) phop->fileOut);
|
||||
#if 0
|
||||
if (log_flags.http_debug) {
|
||||
msg_printf(NULL, MSG_INFO, "HTTP: wrote %d bytes", stWrite);
|
||||
}
|
||||
#endif
|
||||
phop->bytes_xferred += (double)(stWrite);
|
||||
//if (phop->bytes_xferred == (int) phop->content_length)
|
||||
//{ // that's all we need!
|
||||
//}
|
||||
phop->update_speed(); // this should update the transfer speed
|
||||
return stWrite;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue