mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3263
This commit is contained in:
parent
7914d8d19e
commit
1aa4230d9a
|
@ -11454,7 +11454,7 @@ David April 8 2004
|
|||
|
||||
David April 8 2004
|
||||
- If an active task is in limbo, don't mark its result as done!
|
||||
(from James Drew)
|
||||
(from James Drews)
|
||||
|
||||
client/
|
||||
cs_apps.C
|
||||
|
@ -11600,3 +11600,15 @@ David April 14 2004
|
|||
top_hosts.php
|
||||
top_teams.php
|
||||
top_users.php
|
||||
|
||||
David April 14 2004
|
||||
- added boinc_make_dirs()
|
||||
(preliminary support for projects subdirs for CPDN)
|
||||
- If <non_cpu_intensive/> is in config file, send it in sched replies
|
||||
|
||||
lib/
|
||||
app_ipc.C
|
||||
filesys.C,h
|
||||
sched/
|
||||
sched_config.C,h
|
||||
server_types.C
|
||||
|
|
|
@ -81,31 +81,29 @@ int make_project_dir(PROJECT& p) {
|
|||
|
||||
boinc_mkdir(PROJECTS_DIR);
|
||||
get_project_dir(&p, buf);
|
||||
boinc_mkdir(buf);
|
||||
return 0;
|
||||
return boinc_mkdir(buf);
|
||||
}
|
||||
|
||||
int remove_project_dir(PROJECT& p) {
|
||||
char buf[256];
|
||||
int retval;
|
||||
|
||||
get_project_dir(&p, buf);
|
||||
clean_out_dir(buf);
|
||||
boinc_rmdir(buf);
|
||||
return 0;
|
||||
return boinc_rmdir(buf);
|
||||
}
|
||||
|
||||
// Create the slot directory for the specified slot #
|
||||
//
|
||||
int make_slot_dir(int slot) {
|
||||
char buf[256];
|
||||
if(slot<0) {
|
||||
if (slot<0) {
|
||||
msg_printf(NULL, MSG_ERROR, "make_slot_dir(): negative slot\n");
|
||||
return ERR_NEG;
|
||||
}
|
||||
boinc_mkdir(SLOTS_DIR);
|
||||
get_slot_dir(slot, buf);
|
||||
boinc_mkdir(buf);
|
||||
return 0;
|
||||
return boinc_mkdir(buf);
|
||||
}
|
||||
|
||||
void get_account_filename(char* master_url, char* path) {
|
||||
|
|
|
@ -117,7 +117,7 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
#endif
|
||||
else if (parse_double(buf, "<checkpoint_period>", ai.checkpoint_period)) continue;
|
||||
else if (parse_double(buf, "<fraction_done_update_period>", ai.fraction_done_update_period)) continue;
|
||||
else fprintf(stderr, "parse_init_data_file: unrecognized %s", buf);
|
||||
//else fprintf(stderr, "parse_init_data_file: unrecognized %s", buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -401,6 +401,31 @@ int boinc_rmdir(const char* name) {
|
|||
#endif
|
||||
}
|
||||
|
||||
// if "filepath" is of the form a/b/c,
|
||||
// create directories dirpath/a, dirpath/a/b etc.
|
||||
//
|
||||
int boinc_make_dirs(const char* dirpath, const char* filepath) {
|
||||
char buf[1024], oldpath[1024], newpath[1024];
|
||||
int retval;
|
||||
char *p, *q;
|
||||
|
||||
if (strlen(filepath) + strlen(dirpath) > 1023) return ERR_BUFFER_OVERFLOW;
|
||||
strcpy(buf, filepath);
|
||||
|
||||
q = buf;
|
||||
while(*q) {
|
||||
p = strchr(q, '/');
|
||||
if (!p) break;
|
||||
*p = 0;
|
||||
sprintf(newpath, "%s%s%s", oldpath, PATH_SEPARATOR, q);
|
||||
retval = boinc_mkdir(newpath);
|
||||
if (retval) return retval;
|
||||
strcpy(oldpath, newpath);
|
||||
q = p+1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lock_file(char* filename) {
|
||||
int retval;
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ extern int lock_file(char*);
|
|||
extern void full_path(char* relname, char* path);
|
||||
#endif
|
||||
extern int get_filesystem_info(double& total, double& free);
|
||||
extern int boinc_make_dirs(char*, char*);
|
||||
|
||||
class DirScanner {
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -64,6 +64,9 @@ int SCHED_CONFIG::parse(istream& f) {
|
|||
if (match_tag(buf.c_str(), "<one_result_per_user_per_wu/>")) {
|
||||
one_result_per_user_per_wu = true;
|
||||
}
|
||||
if (match_tag(buf.c_str(), "<non_cpu_intensive/>")) {
|
||||
non_cpu_intensive = true;
|
||||
}
|
||||
if (match_tag(buf.c_str(), "<trickle_down/>")) {
|
||||
trickle_down = true;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
bool trickle_down;
|
||||
int min_sendwork_interval;
|
||||
int max_wus_to_send;
|
||||
bool non_cpu_intensive;
|
||||
|
||||
int parse(istream& f);
|
||||
int parse_file(char* dir=".");
|
||||
|
|
|
@ -310,6 +310,9 @@ int SCHEDULER_REPLY::write(FILE* fout) {
|
|||
td.xml
|
||||
);
|
||||
}
|
||||
if (config.non_cpu_intensive) {
|
||||
fprintf(fout, "<non_cpu_intensive/>\n");
|
||||
}
|
||||
end:
|
||||
fprintf(fout,
|
||||
"</scheduler_reply>\n"
|
||||
|
|
Loading…
Reference in New Issue