mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3296
This commit is contained in:
parent
b776bdc13f
commit
ef782b7cd0
|
@ -185,7 +185,7 @@ int boinc_parse_init_data_file() {
|
|||
//
|
||||
if (!boinc_file_exists(INIT_DATA_FILE)) {
|
||||
if (standalone) {
|
||||
safe_strncpy(aid.app_preferences, "", sizeof(aid.app_preferences));
|
||||
safe_strncpy(aid.project_preferences, "", sizeof(aid.project_preferences));
|
||||
safe_strncpy(aid.user_name, "Unknown user", sizeof(aid.user_name));
|
||||
safe_strncpy(aid.team_name, "Unknown team", sizeof(aid.team_name));
|
||||
aid.wu_cpu_time = 1000;
|
||||
|
|
|
@ -11774,11 +11774,14 @@ David April 22 2004
|
|||
filesys.C,h
|
||||
|
||||
David April 23 2004
|
||||
- added new items to APP_INIT_DATE (for Folding@home):
|
||||
- added new items to APP_INIT_DATA (for Folding@home):
|
||||
slot
|
||||
boinc_dir
|
||||
authenticator
|
||||
- rename app_preferences to project_preferences in APP_INIT_DATA
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
client/
|
||||
app.C
|
||||
lib/
|
||||
|
|
|
@ -200,7 +200,7 @@ int ACTIVE_TASK::write_app_init_file(APP_INIT_DATA& aid) {
|
|||
safe_strcpy(aid.user_name, wup->project->user_name);
|
||||
safe_strcpy(aid.team_name, wup->project->team_name);
|
||||
if (wup->project->project_specific_prefs.length()) {
|
||||
strcpy(aid.app_preferences, wup->project->project_specific_prefs.c_str());
|
||||
strcpy(aid.project_preferences, wup->project->project_specific_prefs.c_str());
|
||||
}
|
||||
get_project_dir(wup->project, project_dir);
|
||||
relative_to_absolute(project_dir, project_path);
|
||||
|
|
|
@ -133,6 +133,10 @@ html_text("
|
|||
char project_preferences[4096];
|
||||
char user_name[256];
|
||||
char team_name[256];
|
||||
char project_dir[256];
|
||||
char boinc_dir[256];
|
||||
char wu_name[256];
|
||||
char authenticator[256];
|
||||
double user_total_credit;
|
||||
double user_expavg_credit;
|
||||
double team_total_credit;
|
||||
|
@ -146,6 +150,10 @@ list_item("project_preferences", "An XML string containing
|
|||
the user's project-specific preferences.");
|
||||
list_item("user_name", " the user's 'screen name' on this project.");
|
||||
list_item("team_name", " the user's team name, if any.");
|
||||
list_item("project_dir", "absolute path of project directory");
|
||||
list_item("boinc_dir", "absolute path of BOINC root directory");
|
||||
list_item("wu_name", "name of workunit being processed");
|
||||
list_item("authenticator", "user's authenticator for this project");
|
||||
list_item("user_total_credit", " user's total work for this project.");
|
||||
list_item("user_expavg_credit", " user's recent average work per day.");
|
||||
list_item("team_total_credit", " team's total work for this project.");
|
||||
|
|
|
@ -46,8 +46,8 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
if (strlen(ai.app_name)) {
|
||||
fprintf(f, "<app_name>%s</app_name>\n", ai.app_name);
|
||||
}
|
||||
if (strlen(ai.app_preferences)) {
|
||||
fprintf(f, "<app_preferences>\n%s</app_preferences>\n", ai.app_preferences);
|
||||
if (strlen(ai.project_preferences)) {
|
||||
fprintf(f, "<project_preferences>\n%s</project_preferences>\n", ai.project_preferences);
|
||||
}
|
||||
if (strlen(ai.team_name)) {
|
||||
str1 = ai.team_name;
|
||||
|
@ -103,11 +103,11 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
char buf[256];
|
||||
memset(&ai, 0, sizeof(ai));
|
||||
while (fgets(buf, 256, f)) {
|
||||
if (match_tag(buf, "<app_preferences>")) {
|
||||
safe_strncpy(ai.app_preferences, "", sizeof(ai.app_preferences));
|
||||
if (match_tag(buf, "<project_preferences>")) {
|
||||
safe_strncpy(ai.project_preferences, "", sizeof(ai.project_preferences));
|
||||
while (fgets(buf, 256, f)) {
|
||||
if (match_tag(buf, "</app_preferences>")) break;
|
||||
safe_strcat(ai.app_preferences, buf);
|
||||
if (match_tag(buf, "</project_preferences>")) break;
|
||||
safe_strcat(ai.project_preferences, buf);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
//
|
||||
struct APP_INIT_DATA {
|
||||
char app_name[256];
|
||||
char app_preferences[4096];
|
||||
char project_preferences[4096];
|
||||
char user_name[256];
|
||||
char team_name[256];
|
||||
char project_dir[256];
|
||||
|
|
Loading…
Reference in New Issue