diff --git a/client/cs_statefile.C b/client/cs_statefile.C index 2576b75214..9b03743f6f 100644 --- a/client/cs_statefile.C +++ b/client/cs_statefile.C @@ -86,7 +86,7 @@ int CLIENT_STATE::parse_state_file() { FILE_INFO* fip = new FILE_INFO; fip->parse(mf, false); if (project) { - retval = link_file_info(project, fip); + retval = link_file_info(project, fip, false); if (!retval) file_infos.push_back(fip); // If the file had a failure before, there's no reason // to start another file transfer @@ -336,7 +336,7 @@ int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) { delete fip; continue; } - if (link_file_info(p, fip)) { + if (link_file_info(p, fip, true)) { delete fip; continue; } diff --git a/client/file_names.h b/client/file_names.h index d9a932e99d..efefb574ea 100644 --- a/client/file_names.h +++ b/client/file_names.h @@ -63,5 +63,6 @@ extern void escape_project_url(char *in, char* out); #define LIST_STATE_FILE_NAME "list.ini" #define APP_INFO_FILE_NAME "app_info.xml" #define REMOTEHOST_FILE_NAME "remote_hosts.cfg" +#define FILE_LIST_NAME "file_list.xml" #endif diff --git a/client/gui_titles.C b/client/gui_titles.C index 8c1bd19272..afd813fdf1 100644 --- a/client/gui_titles.C +++ b/client/gui_titles.C @@ -23,7 +23,9 @@ char g_szUsageItems[MAX_USAGE_STR][256] = { "Free space", "Used space: non-BOINC", "Used space: BOINC", + "Reserved space: BOINC", "BOINC software", + "BOINC free space", }; char g_szMiscItems[MAX_MISC_STR][256] = { diff --git a/client/main.C b/client/main.C index 55b94b107a..8b2b62f82e 100644 --- a/client/main.C +++ b/client/main.C @@ -74,6 +74,31 @@ void project_add_failed(PROJECT* project) { exit(1); } +// This gets called when the client doesn't have enough disk space to continue +// running its active tasks. Notify user which project is the greatest offender +// of their data share +// +void data_overflow_notify(PROJECT* project) { + if(project == NULL) { + printf( + "Your disk space parameters are too small.\n" + "BOINC no longer has space to run computation.\n" + "Please visit your project's website and change your\n" + "General Prefs to accomidate the size of the project.\n" + ); + } else { + printf( + "Your disk space parameters are too small.\n" + "BOINC no longer has space to run %s.\n" + "Please visit %s and change your\n" + "General Prefs to accomidate the size of the project.\n", + project->project_name, project->master_url + ); + } + gstate.quit_activities(); + exit(1); +} + // Display a message to the user. // Depending on the priority, the message may be more or less obtrusive // diff --git a/client/scheduler_op.C b/client/scheduler_op.C index a5e5190036..9d4808b340 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -556,6 +556,7 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) { char buf[256], *p; int retval; MIOFILE mf; + char delete_file_name[256]; mf.init_file(in); SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCHED_OP); @@ -581,6 +582,8 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) { message_ack = false; project_is_down = false; send_file_list = false; + deletion_policy_priority = false; + deletion_policy_expire = false; p = fgets(buf, 256, in); if (!p) { @@ -628,6 +631,12 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) { if (retval) return ERR_XML_PARSE; // TODO: display message below if project preferences have changed. // msg_printf(project, MSG_INFO, "Project preferences have been updated\n"); + } else if (match_tag(buf, "")) { + deletion_policy_priority = true; + continue; + } else if (match_tag(buf, "")) { + deletion_policy_expire = true; + continue; } else if (match_tag(buf, "")) { retval = dup_element_contents( in, @@ -670,6 +679,10 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) { RESULT result; result.parse_ack(in); result_acks.push_back(result); + } else if (parse_str(buf, "", delete_file_name, sizeof(delete_file_name))) { + STRING256 delete_file; + strcpy(delete_file.text, delete_file_name); + file_deletes.push_back(delete_file); } else if (parse_str(buf, " apps; std::vector file_infos; + std::vector file_deletes; std::vector app_versions; std::vector workunits; std::vector results; @@ -113,7 +114,9 @@ struct SCHEDULER_REPLY { char* code_sign_key_signature; bool message_ack; bool project_is_down; - bool send_file_list; + bool send_file_list; + bool deletion_policy_priority; + bool deletion_policy_expire; SCHEDULER_REPLY(); ~SCHEDULER_REPLY();