remote job submission: fix bug

This commit is contained in:
David Anderson 2014-04-14 12:33:43 -07:00
parent 44d8c63ff1
commit 65ec42da6c
2 changed files with 6 additions and 4 deletions

View File

@ -186,7 +186,7 @@ function submit_jobs($jobs, $template, $app, $batch_id, $priority) {
}
fwrite($h, $x);
$ret = pclose($h);
if ($ret < 0) {
if ($ret) {
xml_error(-1, "BOINC server: create_work failed");
}
}

View File

@ -139,6 +139,8 @@ void JOB_DESC::parse_cmdline(int argc, char** argv) {
for (int i=0; i<argc; i++) {
if (arg(argv, i, (char*)"command_line")) {
command_line = argv[++i];
} else if (arg(argv, i, (char*)"wu_name")) {
strcpy(wu.name, argv[++i]);
} else {
if (!strncmp("-", argv[i], 1)) {
fprintf(stderr, "create_work: bad stdin argument '%s'\n", argv[i]);
@ -378,9 +380,9 @@ int main(int argc, char** argv) {
}
} else {
jd.create();
}
if (show_wu_name) {
printf("workunit name: %s\n", jd.wu.name);
if (show_wu_name) {
printf("workunit name: %s\n", jd.wu.name);
}
}
boinc_db.close();
}