mirror of https://github.com/BOINC/boinc.git
- file_upload_handler: bug fix
- volunteer storage: buf fixes svn path=/trunk/boinc/; revision=26056
This commit is contained in:
parent
e79d3ea4c8
commit
2ebc7de2cb
|
@ -5677,3 +5677,13 @@ David 21 Aug 2012
|
|||
boinc_db_types.h
|
||||
sched/
|
||||
sched_types.h
|
||||
|
||||
David 22 Aug 2012
|
||||
- file_upload_handler: bug fix
|
||||
- volunteer storage: buf fixes
|
||||
|
||||
vda/
|
||||
vda_lib2.cpp
|
||||
vda_lib.h
|
||||
sched/
|
||||
file_upload_handler.cpp
|
||||
|
|
|
@ -139,7 +139,7 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
|
|||
// Advisory file locking is not guaranteed reliable when
|
||||
// used with stream buffered IO.
|
||||
//
|
||||
int fd = open(path,
|
||||
fd = open(path,
|
||||
O_WRONLY|O_CREAT,
|
||||
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH
|
||||
);
|
||||
|
|
|
@ -80,6 +80,7 @@ struct VDA_FILE_AUX : VDA_FILE {
|
|||
VDA_FILE_AUX(DB_VDA_FILE f) : VDA_FILE(f) {
|
||||
max_chunks = 0;
|
||||
enum_active = false;
|
||||
last_id = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ int META_CHUNK::init(const char* _dir, POLICY& p, int coding_level) {
|
|||
if (coding_level < p.coding_levels - 1) {
|
||||
for (int i=0; i<coding.m; i++) {
|
||||
sprintf(child_dir, "%s/%d", dir, i);
|
||||
META_CHUNK* mc = new META_CHUNK(dfile, parent, i);
|
||||
META_CHUNK* mc = new META_CHUNK(dfile, this, i);
|
||||
retval = mc->init(child_dir, p, coding_level+1);
|
||||
if (retval) return retval;
|
||||
children.push_back(mc);
|
||||
|
@ -181,7 +181,7 @@ int META_CHUNK::get_state(const char* _dir, POLICY& p, int coding_level) {
|
|||
if (coding_level < p.coding_levels - 1) {
|
||||
for (int i=0; i<coding.m; i++) {
|
||||
char child_dir[1024];
|
||||
sprintf(child_dir, "%s/%s.%d", dir, DATA_FILENAME, i);
|
||||
sprintf(child_dir, "%s/%d", dir, i);
|
||||
META_CHUNK* mc = new META_CHUNK(dfile, this, i);
|
||||
retval = mc->get_state(child_dir, p, coding_level+1);
|
||||
if (retval) return retval;
|
||||
|
@ -388,6 +388,7 @@ CHUNK::CHUNK(META_CHUNK* mc, double s, int index) {
|
|||
int CHUNK::assign() {
|
||||
int host_id = parent->dfile->choose_host();
|
||||
if (!host_id) {
|
||||
log_messages.printf(MSG_CRITICAL, "CHUNK::assign: can't get host\n");
|
||||
return ERR_NOT_FOUND;
|
||||
}
|
||||
DB_VDA_CHUNK_HOST ch;
|
||||
|
@ -626,9 +627,13 @@ int VDA_FILE_AUX::choose_host() {
|
|||
);
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (retval) {
|
||||
// a DB error occurred
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"choose_host(): DB error %d\n", retval
|
||||
);
|
||||
enum_active = false;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue