diff --git a/client/scheduler_op.C b/client/scheduler_op.C index 38202a74bc..6c568ba7a7 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -493,12 +493,20 @@ int SCHEDULER_REPLY::parse(FILE* in) { char buf[256], *p; int retval; + hostid = 0; + host_total_credit = 0; + host_expavg_credit = 0; + host_create_time = 0; + request_delay = 0; strcpy(message, ""); strcpy(message_priority, ""); - request_delay = 0; - hostid = 0; + strcpy(project_name, ""); global_prefs_xml = 0; project_prefs_xml = 0; + strcpy(user_name, ""); + user_total_credit = 0; + user_expavg_credit = 0; + user_create_time = 0; code_sign_key = 0; code_sign_key_signature = 0; diff --git a/db/db.h b/db/db.h index 4e205ce156..6b4baeba85 100644 --- a/db/db.h +++ b/db/db.h @@ -119,6 +119,7 @@ struct USER { char project_prefs[MAX_BLOB_SIZE]; // within tag int teamid; // if user is part of a team + char venue[256]; // home/work/school (default) }; #define TEAM_TYPE_CLUB 1 @@ -190,6 +191,8 @@ struct HOST { // The following is derived (by server) from other fields double credit_per_cpu_sec; + char venue[256]; // home/work/school + int parse(FILE*); int parse_time_stats(FILE*); int parse_net_stats(FILE*); @@ -238,6 +241,7 @@ struct WORKUNIT { int file_delete_state; int assimilate_state; int workseq_next; // if part of a sequence, the next WU + int opaque; // project-specific; usually external ID // the following not used in the DB char app_name[256]; @@ -291,6 +295,7 @@ struct RESULT { int validate_state; double claimed_credit; // CPU time times host credit/sec double granted_credit; // == canonical credit of WU + int opaque; // project-specific; usually external ID // the following not used in the DB char wu_name[256]; diff --git a/db/db_mysql.C b/db/db_mysql.C index fba8932368..4dc8973049 100644 --- a/db/db_mysql.C +++ b/db/db_mysql.C @@ -156,7 +156,7 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { "country='%s', postal_code='%s', " "total_credit=%.12e, expavg_credit=%.12e, expavg_time=%f, " "global_prefs='%s', project_prefs='%s', " - "teamid=%d", + "teamid=%d, venue='%s'", up->id, up->create_time, up->email_addr, @@ -170,7 +170,8 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { up->expavg_time, up->global_prefs, up->project_prefs, - up->teamid + up->teamid, + up->venue ); unescape(up->email_addr); unescape(up->name); @@ -234,7 +235,8 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { "m_nbytes=%f, m_cache=%f, m_swap=%f, " "d_total=%f, d_free=%f, " "n_bwup=%f, n_bwdown=%f, " - "credit_per_cpu_sec=%f", + "credit_per_cpu_sec=%f, " + "venue='%s'", hp->id, hp->create_time, hp->userid, hp->rpc_seqno, hp->rpc_time, hp->total_credit, hp->expavg_credit, hp->expavg_time, @@ -247,7 +249,8 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { hp->m_nbytes, hp->m_cache, hp->m_swap, hp->d_total, hp->d_free, hp->n_bwup, hp->n_bwdown, - hp->credit_per_cpu_sec + hp->credit_per_cpu_sec, + hp->venue ); unescape(hp->domain_name); unescape(hp->serialnum); @@ -267,7 +270,7 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { "canonical_resultid=%d, canonical_credit=%f, " "timeout_check_time=%d, delay_bound=%d, " "error_mask=%d, file_delete_state=%d, assimilate_state=%d, " - "workseq_next=%d", + "workseq_next=%d, opaque=%d", wup->id, wup->create_time, wup->appid, wup->name, wup->xml_doc, wup->batch, wup->rsc_fpops, wup->rsc_iops, wup->rsc_memory, wup->rsc_disk, @@ -275,7 +278,7 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { wup->canonical_resultid, wup->canonical_credit, wup->timeout_check_time, wup->delay_bound, wup->error_mask, wup->file_delete_state, wup->assimilate_state, - wup->workseq_next + wup->workseq_next, wup->opaque ); break; case TYPE_RESULT: @@ -287,14 +290,14 @@ void BOINC_MYSQL_DB::struct_to_str(void* vp, char* q, int type) { "name='%s', cpu_time=%f, " "xml_doc_in='%s', xml_doc_out='%s', stderr_out='%s', " "batch=%d, file_delete_state=%d, validate_state=%d, " - "claimed_credit=%f, granted_credit=%f", + "claimed_credit=%f, granted_credit=%f, opaque=%d", rp->id, rp->create_time, rp->workunitid, rp->server_state, rp->outcome, rp->client_state, rp->hostid, rp->report_deadline, rp->sent_time, rp->received_time, rp->name, rp->cpu_time, rp->xml_doc_in, rp->xml_doc_out, rp->stderr_out, rp->batch, rp->file_delete_state, rp->validate_state, - rp->claimed_credit, rp->granted_credit + rp->claimed_credit, rp->granted_credit, rp->opaque ); break; case TYPE_WORKSEQ: @@ -386,6 +389,7 @@ void BOINC_MYSQL_DB::row_to_struct(MYSQL_ROW& r, void* vp, int type) { strcpy2(up->global_prefs, r[i++]); strcpy2(up->project_prefs, r[i++]); up->teamid = atoi(r[i++]); + strcpy2(up->venue, r[i++]); break; case TYPE_TEAM: tp = (TEAM*)vp; @@ -439,6 +443,7 @@ void BOINC_MYSQL_DB::row_to_struct(MYSQL_ROW& r, void* vp, int type) { hp->n_bwup = atof(r[i++]); hp->n_bwdown = atof(r[i++]); hp->credit_per_cpu_sec = atof(r[i++]); + strcpy2(hp->venue, r[i++]); break; case TYPE_WORKUNIT: wup = (WORKUNIT*)vp; @@ -462,6 +467,7 @@ void BOINC_MYSQL_DB::row_to_struct(MYSQL_ROW& r, void* vp, int type) { wup->file_delete_state = atoi(r[i++]); wup->assimilate_state = atoi(r[i++]); wup->workseq_next = atoi(r[i++]); + wup->opaque = atoi(r[i++]); break; case TYPE_RESULT: rp = (RESULT*)vp; @@ -486,6 +492,7 @@ void BOINC_MYSQL_DB::row_to_struct(MYSQL_ROW& r, void* vp, int type) { rp->validate_state = atoi(r[i++]); rp->claimed_credit = atof(r[i++]); rp->granted_credit = atof(r[i++]); + rp->opaque = atoi(r[i++]); break; case TYPE_WORKSEQ: wsp = (WORKSEQ*)vp; diff --git a/db/schema.sql b/db/schema.sql index 6cd9dcf8f3..cd5f6232c1 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -52,6 +52,7 @@ create table user ( global_prefs blob, project_prefs blob, teamid integer not null, + venue varchar(254) not null, primary key (id) ); @@ -114,6 +115,7 @@ create table host ( n_bwdown double not null, credit_per_cpu_sec double not null, + venue varchar(254) not null, primary key (id) ); @@ -144,6 +146,7 @@ create table workunit ( file_delete_state integer not null, assimilate_state integer not null, workseq_next integer not null, + opaque integer not null, primary key (id) ); @@ -168,6 +171,7 @@ create table result ( validate_state integer not null, claimed_credit double not null, granted_credit double not null, + opaque integer not null, primary key (id) ); diff --git a/html/ops/db.inc b/html/ops/db.inc index 3cb750f526..1ea1f59ce4 100644 --- a/html/ops/db.inc +++ b/html/ops/db.inc @@ -74,6 +74,7 @@ function show_host($host) { start_table(); row("Created", time_str($host->create_time)); + row("Venue", $host->venue); row("Total credit", $host->total_credit); row("Average credit", $host->expavg_credit); row("Average update time", time_str($host->expavg_time)); @@ -247,6 +248,7 @@ function show_user($user) { row("Total credit", $user->total_credit); row("Average credit", $user->expavg_credit); row("Last average time", time_str($user->expavg_time)); + row("Venue", $user->venue); end_table(); } diff --git a/html/user/account_setup_first.php b/html/user/account_setup_first.php index 7cebaa7a0a..6b020f6d15 100644 --- a/html/user/account_setup_first.php +++ b/html/user/account_setup_first.php @@ -20,14 +20,25 @@ echo "
You can control when and how your computer is used.
- We suggest using the defaults settings - - just go to the bottom and click OK. + To use the defaults settings, + scroll to the bottom and click OK. "; $prefs = default_prefs(); global_prefs_update($user, $prefs); project_prefs_update($user, $prefs); -prefs_form_global($user, $prefs, "account_setup_first_email.php"); +echo "
+ +"; +prefs_form_global($user, $prefs); +prefs_form_email($prefs); +venue_form($user); + +echo " +

+
\n +"; + page_tail(); ?> diff --git a/html/user/prefs_edit_email_action.php b/html/user/account_setup_first_action.php similarity index 54% rename from html/user/prefs_edit_email_action.php rename to html/user/account_setup_first_action.php index e0bdc2e202..e2030c9d97 100644 --- a/html/user/prefs_edit_email_action.php +++ b/html/user/account_setup_first_action.php @@ -4,8 +4,6 @@ include_once("db.inc"); include_once("util.inc"); include_once("prefs.inc"); -parse_str(getenv("QUERY_STRING")); - $authenticator = init_session(); db_init(); @@ -15,10 +13,18 @@ if ($user == NULL) { exit(); } -no_cache(); -$prefs = prefs_parse($user->project_prefs); +// TODO: consolidate the three DB updates into one + +$prefs = prefs_parse($user->prefs); +prefs_global_parse_form($prefs); +global_prefs_update($user, $prefs); + prefs_email_parse_form($prefs); project_prefs_update($user, $prefs); -Header("Location: $next_url"); + +venue_parse($user); +venue_update($user); + +Header("Location: account_setup_first_download.php"); ?> diff --git a/html/user/account_setup_first_email.php b/html/user/account_setup_first_email.php deleted file mode 100644 index 534857d66d..0000000000 --- a/html/user/account_setup_first_email.php +++ /dev/null @@ -1,24 +0,0 @@ -Account setup: email options -
-"; -$prefs = default_prefs(); -prefs_form_email($prefs, "account_setup_first_download.php"); -page_tail(); - -?> diff --git a/html/user/account_setup_first_project.php b/html/user/account_setup_first_project.php deleted file mode 100644 index e19cab3acb..0000000000 --- a/html/user/account_setup_first_project.php +++ /dev/null @@ -1,25 +0,0 @@ -Account setup: graphics -
- ".PROJECT." lets you control the following properties of its graphics. -"; -$prefs = null; -prefs_form_project($prefs, "account_setup_first_download.php"); -page_tail(); - -?> diff --git a/html/user/account_setup_nonfirst.php b/html/user/account_setup_nonfirst.php index 5d91ce7282..451ad7ab7c 100644 --- a/html/user/account_setup_nonfirst.php +++ b/html/user/account_setup_nonfirst.php @@ -14,18 +14,21 @@ if ($user == NULL) { } page_head("Account setup: resource share", $user); echo " -

Account setup: resource share

-
- You can control how your resources - (computer time and disk space) are divided - among ".PROJECT." and the other BOINC-based projects - in which you participate. - You do this by assigning a resource share to each project. - The resources allocated to a project are proportional to its resource share. - The default resource share is 100. +

Account setup

"; $prefs = prefs_parse($user->project_prefs); -prefs_form_resource($prefs, "account_setup_nonfirst_email.php"); +echo "
+ +"; +prefs_form_resource($prefs); + +venue_form($user); + +echo " +

+
\n +"; + page_tail(); ?> diff --git a/html/user/prefs_edit_resource_action.php b/html/user/account_setup_nonfirst_action.php similarity index 71% rename from html/user/prefs_edit_resource_action.php rename to html/user/account_setup_nonfirst_action.php index 32c9e67d90..9866bb0bcf 100644 --- a/html/user/prefs_edit_resource_action.php +++ b/html/user/account_setup_nonfirst_action.php @@ -4,8 +4,6 @@ include_once("db.inc"); include_once("util.inc"); include_once("prefs.inc"); -parse_str(getenv("QUERY_STRING")); - $authenticator = init_session(); db_init(); @@ -15,10 +13,10 @@ if ($user == NULL) { exit(); } -no_cache(); -$prefs = prefs_parse($user->project_prefs); +$prefs = prefs_parse($user->prefs); prefs_resource_parse_form($prefs); project_prefs_update($user, $prefs); -Header("Location: $next_url"); + +Header("Location: account_setup_nonfirst_done.php"); ?> diff --git a/html/user/account_setup_nonfirst_email.php b/html/user/account_setup_nonfirst_email.php deleted file mode 100644 index ca2a903d55..0000000000 --- a/html/user/account_setup_nonfirst_email.php +++ /dev/null @@ -1,24 +0,0 @@ -Account setup: email options -
-"; -$prefs = default_prefs(); -prefs_form_email($prefs, "account_setup_nonfirst_done.php"); -page_tail(); - -?> diff --git a/html/user/account_setup_nonfirst_project.php b/html/user/account_setup_nonfirst_project.php deleted file mode 100644 index 2075fc3d30..0000000000 --- a/html/user/account_setup_nonfirst_project.php +++ /dev/null @@ -1,25 +0,0 @@ -Account setup: graphics -
- ".PROJECT." lets you control the following properties of its graphics. -"; -$prefs = null; -prefs_form_project($prefs, "account_setup_nonfirst_done.php"); -page_tail(); - -?> diff --git a/html/user/create_account_action.php b/html/user/create_account_action.php index a022f87cf7..fb5f4431f4 100644 --- a/html/user/create_account_action.php +++ b/html/user/create_account_action.php @@ -40,7 +40,7 @@ function show_error($str) { $authenticator = random_string(); $query = sprintf( - "insert into user (create_time, email_addr, name, web_password, authenticator, country, postal_code, total_credit, expavg_credit, expavg_time, teamid) values(%d, '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 0, 0)", + "insert into user (create_time, email_addr, name, web_password, authenticator, country, postal_code, total_credit, expavg_credit, expavg_time, teamid, venue) values(%d, '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 0, 0, 'home')", time(), $new_email_addr, $HTTP_POST_VARS["new_name"], diff --git a/html/user/prefs.inc b/html/user/prefs.inc index 7aa7954d97..4595d2b00c 100644 --- a/html/user/prefs.inc +++ b/html/user/prefs.inc @@ -170,8 +170,6 @@ function prefs_parse($prefs_xml) { // display preference subsets, with Edit buttons // function prefs_show_global($prefs) { - echo "".TD2.LG_FONT."Global preferences -
These apply to all BOINC projects in which you participate\n"; if ($prefs->dont_run_on_batteries) { $batteries = "No"; } else { @@ -195,29 +193,23 @@ function prefs_show_global($prefs) { row2a("Maximum disk space to use:", "$prefs->disk_max_used_gb GB"); row2a("Minimum disk space to leave free:", "$prefs->disk_min_free_gb GB"); row2a("Maximum % of disk allowed to used:", "$prefs->disk_max_used_pct %"); - echo "Edit global preferences\n"; } function prefs_show_resource($prefs) { - echo "".TD2.LG_FONT."Resource share -
Control how your resources are divided among BOINC projects\n"; - row2a(PROJECT." resource share:", $prefs->resource_share); - echo "Edit resource share\n"; + row2( + "Resource share: +
If you participate in multiple BOINC projects, this is the proportion of your resources used by ".PROJECT."", + $prefs->resource_share + ); } function prefs_show_email($prefs) { - echo "".TD2.LG_FONT."Email options -
Control how ".PROJECT." uses your email address\n"; - row2a("Should ".PROJECT." send you email newsletters?", $prefs->send_email?"Yes":"No"); - row2a("Should ".PROJECT." show your email address on its web site?", $prefs->show_email?"Yes":"No"); - echo "Edit email options\n"; + row2("Should ".PROJECT." send you email newsletters?", $prefs->send_email?"Yes":"No"); + row2("Should ".PROJECT." show your email address on its web site?", $prefs->show_email?"Yes":"No"); } function prefs_show_project($prefs) { - echo "".TD2.LG_FONT."Graphics preferences -
Customize ".PROJECT." screensaver graphics\n"; project_specific_prefs_show($prefs); - echo "Edit graphics preferences\n"; } function print_prefs_display($user) { @@ -226,10 +218,16 @@ function print_prefs_display($user) { $project_prefs = prefs_parse($user->project_prefs); $project_specific_prefs = project_specific_prefs_parse($project_prefs->project_specific); + echo "".PROJECT." preferences\n"; prefs_show_resource($project_prefs); prefs_show_project($project_specific_prefs); prefs_show_email($project_prefs); + echo "Edit ".PROJECT." preferences\n"; + echo "
\n"; + echo "BOINC preferences +
These apply to all BOINC projects in which you participate\n"; prefs_show_global($global_prefs); + echo "Edit BOINC preferences\n"; echo ""; } @@ -237,12 +235,9 @@ function print_prefs_display($user) { // // Functions to display preference subsets as forms // -function prefs_form_global($user, $prefs, $next_url) { - echo "
- - - - + - - -
Should ".PROJECT." run while computer is on batteries? +function prefs_form_global($user, $prefs) { + echo "
Should ".PROJECT." run while the computer is on battery power?
(This matters only for portable computers)
"; @@ -257,7 +252,7 @@ function prefs_form_global($user, $prefs, $next_url) { printf("No \n", $prefs->dont_run_if_user_active?"checked":""); echo "
Wait for your OK before connecting to Internet? + Ask you before connecting to Internet?
(This matters only if you use a modem)
"; @@ -286,17 +281,11 @@ function prefs_form_global($user, $prefs, $next_url) { Use no more than % of total space

-
"; } -function prefs_form_email($prefs, $next_url) { - echo "
- - - +function prefs_form_email($prefs) { + echo " - -
Should ".PROJECT." send you email newsletters? "; printf("Yes \n", $prefs->send_email?"checked":""); @@ -307,37 +296,48 @@ function prefs_form_email($prefs, $next_url) { printf("Yes \n", $prefs->show_email?"checked":""); printf("No \n", $prefs->show_email?"":"checked"); echo"

"; } -function prefs_form_resource($prefs, $next_url) { - echo "
- - - - - - -
Resource share: -
The proportion of your resources -
allocated to ".PROJECT.".

+function prefs_form_resource($prefs) { + echo " + Resource share: +
The proportion of your computer's resources + (processing time and disk space) + allocated to ".PROJECT." + relative to the other BOINC projects in which you participate. + The default is 100. + For example, if you participate in two projects and + give them resource shares of 100 and 200, + the first will get 1/3 of our resources and the second will get 2/3. +
+ "; } -function prefs_form_project($prefs_xml, $next_url) { +function prefs_form_project($prefs_xml) { $prefs = project_specific_prefs_parse($prefs_xml); - echo "
- - - "; project_specific_prefs_edit($prefs); - echo " - -

-
- "; +} + +function venue_form($user) { + echo "Computer location + + + "; +} + +function venue_parse(&$user) { + parse_str(getenv("QUERY_STRING")); + $user->venue = $venue; +} + +function venue_update($user) { + mysql_query("update user set venue='$user->venue' where id=$user->id"); } //////////////////////////////////////////// @@ -389,13 +389,13 @@ function global_prefs_make_xml($prefs) { if ($prefs->confirm_before_connecting) { $xml = $xml."\n"; } - $xml = $xml."$prefs->low_water_days -$prefs->high_water_days -"; - $xml = $xml."$prefs->disk_max_used_gb -$prefs->disk_max_used_pct -$prefs->disk_min_free_gb -"; + $xml = $xml + ."$prefs->low_water_days\n" + ."$prefs->high_water_days\n"; + $xml = $xml + ."$prefs->disk_max_used_gb\n" + ."$prefs->disk_max_used_pct\n" + ."$prefs->disk_min_free_gb\n"; $xml = $xml."\n"; return $xml; } diff --git a/html/user/prefs_edit_email_form.php b/html/user/prefs_edit_email_form.php deleted file mode 100644 index e95a1249c8..0000000000 --- a/html/user/prefs_edit_email_form.php +++ /dev/null @@ -1,21 +0,0 @@ -project_prefs); -prefs_form_email($prefs, "prefs.php"); -page_tail(); - -?> diff --git a/html/user/prefs_edit_form.php b/html/user/prefs_edit_form.php deleted file mode 100644 index 7b5b990ee7..0000000000 --- a/html/user/prefs_edit_form.php +++ /dev/null @@ -1,24 +0,0 @@ -project_prefs); -prefs_form_project($prefs); -$prefs = prefs_parse($user->global_prefs); -prefs_form_global($user, $prefs); -echo "

\n"; -page_tail(); - -?> diff --git a/html/user/prefs_edit_global_action.php b/html/user/prefs_edit_global_action.php index 336cd30ec8..b817230fd2 100644 --- a/html/user/prefs_edit_global_action.php +++ b/html/user/prefs_edit_global_action.php @@ -17,6 +17,6 @@ parse_str(getenv("QUERY_STRING")); $prefs = prefs_parse($user->prefs); prefs_global_parse_form($prefs); global_prefs_update($user, $prefs); -Header("Location: $next_url"); +Header("Location: prefs.php"); ?> diff --git a/html/user/prefs_edit_global_form.php b/html/user/prefs_edit_global_form.php index f6edae167c..a8e9b31102 100644 --- a/html/user/prefs_edit_global_form.php +++ b/html/user/prefs_edit_global_form.php @@ -22,7 +22,17 @@ echo "

Edit global preferences


otherwise edits may be overwritten. "; +echo "
+ +"; + prefs_form_global($user, $prefs, "prefs.php"); + +echo " +

+
\n +"; + echo "Back to preferences\n"; page_tail(); diff --git a/html/user/prefs_edit_project_action.php b/html/user/prefs_edit_project_action.php index d749eaa956..920212f604 100644 --- a/html/user/prefs_edit_project_action.php +++ b/html/user/prefs_edit_project_action.php @@ -19,6 +19,13 @@ no_cache(); $prefs = prefs_parse($user->project_prefs); prefs_project_parse_form($prefs); project_prefs_update($user, $prefs); -Header("Location: $next_url"); + +prefs_email_parse_form($prefs); +project_prefs_update($user, $prefs); + +venue_parse($user); +venue_update($user); + +Header("Location: prefs.php"); ?> diff --git a/html/user/prefs_edit_project_form.php b/html/user/prefs_edit_project_form.php index 3e97a7dd6a..1b46b3a191 100644 --- a/html/user/prefs_edit_project_form.php +++ b/html/user/prefs_edit_project_form.php @@ -15,8 +15,20 @@ if ($user == NULL) { page_head("Edit project preferences", $user); parse_str(getenv("QUERY_STRING")); $prefs = prefs_parse($user->project_prefs); -prefs_form_project($prefs, "prefs.php"); -echo "

\n"; + +echo "

+ +"; + +prefs_form_resource($prefs); +prefs_form_project($prefs->project_specific); +prefs_form_email($prefs); + +echo " +

+
\n +"; + page_tail(); ?> diff --git a/html/user/prefs_edit_resource_form.php b/html/user/prefs_edit_resource_form.php deleted file mode 100644 index e28f82bf1c..0000000000 --- a/html/user/prefs_edit_resource_form.php +++ /dev/null @@ -1,21 +0,0 @@ -project_prefs); -prefs_form_resource($prefs, "prefs.php"); -page_tail(); - -?> diff --git a/html/user/project_specific_prefs.inc b/html/user/project_specific_prefs.inc index 6752391bc7..7bee41498e 100644 --- a/html/user/project_specific_prefs.inc +++ b/html/user/project_specific_prefs.inc @@ -42,8 +42,13 @@ function project_specific_prefs_parse_form() { function project_specific_prefs_show($prefs) { echo "\n Color scheme:\n - $prefs->color_scheme\n - \n"; + "; + if ($prefs->color_scheme) { + echo $prefs->color_scheme; + } else { + echo "None selected"; + } + echo "\n"; } // parse XML, fill in struct diff --git a/sched/handle_request.C b/sched/handle_request.C index 768fbd9122..d3f0836e44 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -214,6 +214,7 @@ new_host: reply.host.userid = reply.user.id; reply.host.rpc_seqno = 0; reply.host.rpc_time = time(0); + strcpy(reply.host.venue, reply.user.venue); retval = db_host_new(reply.host); if (retval) { strcpy(reply.message, "server database error"); diff --git a/sched/server_types.C b/sched/server_types.C index b9a088a077..544f0edddf 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -142,22 +142,22 @@ int SCHEDULER_REPLY::write(FILE* fout) { "%s\n" "%f\n" "%f\n" - "%d\n", + "%d\n" + "%f\n" + "%f\n", user.name, user.total_credit, user.expavg_credit, - user.create_time + user.create_time, + host.total_credit, + host.expavg_credit ); if (hostid) { fprintf(fout, "%d\n" - "%f\n" - "%f\n" "%d\n", hostid, - host.total_credit, - host.expavg_credit, host.create_time ); } diff --git a/test/test.inc b/test/test.inc index 2a0f9f1dfa..248adc9a98 100644 --- a/test/test.inc +++ b/test/test.inc @@ -224,7 +224,7 @@ class Project { for ($i=0; $iusers); $i++) { $user = $this->users[$i]; $now = time(0); - db_query("insert into user values (0, $now, '$user->email_addr', '$user->name', 'foobar', '$user->authenticator', 'Peru', '12345', 0, 0, 0, '', '', 0)"); + db_query("insert into user values (0, $now, '$user->email_addr', '$user->name', 'foobar', '$user->authenticator', 'Peru', '12345', 0, 0, 0, '', '', 0, 'home')"); } echo "adding apps\n"; @@ -388,9 +388,9 @@ class Project { // show the URLs for user and admin sites // - echo "The master URL for project $this->long_name is $this->master_url\n"; - $admin_url = $html_url."/".$this->short_name."/html_ops/index.html"; - echo "The admin URL for project $this->long_name is $admin_url\n"; + echo "Master URL: $this->master_url\n"; + $admin_url = $html_url."/".$this->short_name."_admin/index.php"; + echo "Admin URL: $admin_url\n"; } // moves the master web page to temp