Merge branch 'master' of ssh://boinc.berkeley.edu/boinc

This commit is contained in:
Oliver Bock 2013-03-22 10:30:16 +01:00
commit d5c67dcb44
5 changed files with 22 additions and 13 deletions

View File

@ -209,7 +209,7 @@ PROJECT* RSC_WORK_FETCH::choose_project_hyst(
if (log_flags.work_fetch_debug) {
msg_printf(0, MSG_INFO,
"[work_fetch] %s: buffer_low: %s; sim_excluded_instances %d\n",
"[work_fetch] choose_project() for %s: buffer_low: %s; sim_excluded_instances %d\n",
rsc_name(rsc_type), buffer_low?"yes":"no", sim_excluded_instances
);
}
@ -355,9 +355,10 @@ void RSC_WORK_FETCH::set_request(PROJECT* p) {
req_instances = nidle_now;
if (log_flags.work_fetch_debug) {
msg_printf(0, MSG_INFO,
"[work_fetch] set_request(): ninst %d nused_total %f nidle_now %f fetch share %f req_inst %f",
ninstances, w.nused_total, nidle_now, w.fetchable_share, req_instances
msg_printf(p, MSG_INFO,
"[work_fetch] set_request() for %s: ninst %d nused_total %f nidle_now %f fetch share %f req_inst %f req_secs %f",
rsc_name(rsc_type), ninstances, w.nused_total, nidle_now,
w.fetchable_share, req_instances, req_secs
);
}
if (req_instances && !req_secs) {
@ -490,6 +491,12 @@ void RSC_WORK_FETCH::supplement(PROJECT* pp) {
RSC_PROJECT_WORK_FETCH& rpwf = project_state(p);
if (rpwf.anon_skip) continue;
if (p->sched_priority > x) {
if (log_flags.work_fetch_debug) {
msg_printf(pp, MSG_INFO,
"[work_fetch]: not requesting work for %s: %s has higher priority",
rsc_name(rsc_type), p->get_project_name()
);
}
return;
}
}

View File

@ -184,7 +184,7 @@ because your postings have not followed our guidelines.
$body .= "\n\nThe moderator gave the following explanation about your suspension:\n";
$body .= $reason;
}
$success = mail_report_list($forum, $user->name." has been banished.", $body);
$success = mail_report_list($forum, "$user->name (ID $user->id) has been banished.", $body);
$success &= send_email($user, $subject, $body);
pm_send($user, $user, $subject, $body, false);
return $success;

View File

@ -100,7 +100,12 @@ function do_http_op($req, $xml, $op) {
if (!$reply) return array(null, "HTTP error");
$r = simplexml_load_string($reply);
if (!$r) return array(null, "Can't parse reply XML: <pre>".htmlentities($reply)."</pre>");
return array($r, null);
$e = (string)$r->error_msg;
if ($e) {
return array(null, $e);
} else {
return array($r, null);
}
}
function do_batch_op($req, $op) {
@ -149,7 +154,7 @@ function boinc_submit_batch($req) {
if ($name == 'batch_id') {
return array((int)$reply, null);
} else if ($name == 'error') {
return array(null, (string)$reply->message);
return array(null, (string)$reply->err_message);
} else {
return array(null, "Bad reply message");
}

View File

@ -248,7 +248,7 @@ function form_to_request() {
$req->jobs = Array();
$f->source = $input_url;
$f->mode = "remote";
$f->mode = "semilocal";
for ($x=$param_lo; $x<$param_hi; $x += $param_inc) {
$job = null;

View File

@ -93,6 +93,7 @@ function stage_file($file) {
global $fanout;
switch ($file->mode) {
case "semilocal":
case "local":
$md5 = md5_file($file->source);
if (!$md5) {
@ -107,12 +108,8 @@ function stage_file($file) {
return $name;
case "local_staged":
return $file->source;
case "remote":
xml_error(-1, "remote file mode not implemented");
case "semilocal":
xml_error(-1, "semilocal file mode not implemented");
}
xml_error(-1, "unknown file mode $file->mode");
xml_error(-1, "unsupported file mode: $file->mode");
}
// stage all the files