- remote job submission: fix remote file mode, and improve error reporting

This commit is contained in:
David Anderson 2013-03-15 11:26:02 -07:00 committed by Oliver Bock
parent e1d92c76b7
commit 377ef87c0f
2 changed files with 8 additions and 4 deletions

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

@ -93,6 +93,7 @@ function stage_file($file) {
global $fanout;
switch ($file->mode) {
case "remote":
case "local":
$md5 = md5_file($file->source);
if (!$md5) {
@ -107,8 +108,6 @@ 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");
}