diff --git a/checkin_notes b/checkin_notes index f64db9762a..8b01ecc18d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp index afac7d05ec..f900809cca 100644 --- a/sched/file_upload_handler.cpp +++ b/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 ); diff --git a/vda/vda_lib.h b/vda/vda_lib.h index fe926a8c26..d482529cfa 100644 --- a/vda/vda_lib.h +++ b/vda/vda_lib.h @@ -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; } }; diff --git a/vda/vda_lib2.cpp b/vda/vda_lib2.cpp index 0717973641..6eb25fa1cf 100644 --- a/vda/vda_lib2.cpp +++ b/vda/vda_lib2.cpp @@ -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; iinit(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; iget_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; }