*** empty log message ***

svn path=/trunk/boinc/; revision=4280
This commit is contained in:
David Anderson 2004-10-01 07:49:01 +00:00
parent 13dec71885
commit 49b256f338
6 changed files with 44 additions and 15 deletions

View File

@ -17925,3 +17925,21 @@ David 30 Sept 2004
client/
gui_rpc_server.C
David 30 Sept 2004
- First steps in fixing the venue mess:
venue is passed from server to client, never the other way.
- always pass back host credit info in sched reply
(not just if new hostid - how did that happen??)
- add none (---) as an option for venue in web form
- when user change venue of host, tell them that it
will take effect only after a sched request
html/
inc/
host.inc
user/
host_venue_action.php
sched/
handle_request.C
server_types.C,h

View File

@ -1,12 +1,14 @@
<?php
function location_form($host) {
$none = "selected";
if ($host->venue == "home") $h = "selected";
if ($host->venue == "work") $w = "selected";
if ($host->venue == "school") $s = "selected";
$x = "<form action=host_venue_action.php>
<input type=hidden name=hostid value=$host->id>
<select name=venue>
<option value=\"\" $none>---
<option value=home $h>Home
<option value=work $w>Work
<option value=school $s>School

View File

@ -24,7 +24,18 @@
$retval = mysql_query("update host set venue='$venue' where id = $hostid");
if ($retval) {
Header("Location: show_host_detail.php?hostid=$hostid");
page_head("Host venue updated");
echo "
The venue of this host has been set to <b>$venue</b>.
<p>
This change will take effect the next time
the host requests work from the server,
or when you Update this project from
the BOINC Manager on the host.
<p>
<a href=show_host_detail.php?hostid=$hostid>Return to host page</a>.
";
page_tail();
} else {
db_error_page();
}

View File

@ -296,7 +296,6 @@ int handle_global_prefs(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
}
if (update_prefs) {
strcpy(reply.user.global_prefs, sreq.global_prefs_xml);
strncpy(reply.host.venue, sreq.host_venue, sizeof(reply.host.venue));
reply.update_user_record = true;
}
} else {

View File

@ -79,7 +79,6 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
strcpy(projects_xml, "");
strcpy(code_sign_key, "");
strcpy(cross_project_id, "");
strcpy(host_venue, "");
fgets(buf, 256, fin);
if (!match_tag(buf, "<scheduler_request>")) return ERR_XML_PARSE;
@ -119,7 +118,6 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
else if (parse_double(buf, "<potentially_free_offender>", potentially_free_offender)) continue;
else if (parse_double(buf, "<potentially_free_self>", potentially_free_self)) continue;
#endif
else if (parse_str(buf, "<host_venue>", host_venue, sizeof(host_venue))) continue;
else if (match_tag(buf, "<global_preferences>")) {
strcpy(global_prefs_xml, "<global_preferences>\n");
while (fgets(buf, 256, fin)) {
@ -276,18 +274,20 @@ int SCHEDULER_REPLY::write(FILE* fout) {
}
if (hostid) {
fprintf(fout,
"<hostid>%d</hostid>\n"
"<hostid>%d</hostid>\n",
hostid
);
}
fprintf(fout,
"<host_total_credit>%f</host_total_credit>\n"
"<host_expavg_credit>%f</host_expavg_credit>\n"
"<host_venue>%s</host_venue>\n"
"<host_create_time>%d</host_create_time>\n",
hostid,
host.total_credit,
host.expavg_credit,
host.venue,
host.create_time
);
}
// might want to send team credit too.
//

View File

@ -95,7 +95,6 @@ struct SCHEDULER_REQUEST {
char platform_name[256];
char cross_project_id[256];
int hostid; // zero if first RPC
char host_venue[256];
int core_client_major_version;
int core_client_minor_version;
int rpc_seqno;