Skip to content

Commit 4463029

Browse files
authored
Merge pull request #5792 from BOINC/dpa_wsl6
scheduler: fix WSL plan class
2 parents 0f9fe79 + 242786b commit 4463029

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

html/inc/boinc_db.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class BoincDb {
108108
if (self::$dbnum == $dbnum) {
109109
return self::$instance;
110110
}
111-
close();
111+
self::close();
112112
}
113113
if (web_stopped()) {
114114
if ($generating_xml) {

html/ops/db_update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
$cli_only = true;
2323
require_once("../inc/util_ops.inc");
2424

25-
$db = BoincDb::get_aux(false);
25+
$db = BoincDb::get(0);
2626
if (!$db) {
27-
echo "Can't open database\n";
27+
echo "db_update.php: Can't open database\n";
2828
exit;
2929
}
3030

sched/plan_class_spec.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ static bool wu_is_infeasible_for_plan_class(
157157
return false;
158158
}
159159

160+
// parse plan_class_spec.xml
161+
//
160162
int PLAN_CLASS_SPECS::parse_file(const char* path) {
161163
FILE* f = boinc::fopen(path, "r");
162164
if (!f) return ERR_FOPEN;
@@ -544,7 +546,7 @@ bool PLAN_CLASS_SPEC::check(
544546
}
545547

546548
if (wsl) {
547-
if (!sreq.host.wsl_available) {
549+
if (sreq.host.wsl_distros.distros.empty()) {
548550
add_no_work_message("WSL is not available on this host");
549551
return false;
550552
}
@@ -1106,6 +1108,7 @@ int PLAN_CLASS_SPEC::parse(XML_PARSER& xp) {
11061108
if (xp.parse_bool("cal", cal)) continue;
11071109
if (xp.parse_bool("opencl", opencl)) continue;
11081110
if (xp.parse_bool("virtualbox", virtualbox)) continue;
1111+
if (xp.parse_bool("wsl", wsl)) continue;
11091112
if (xp.parse_bool("is64bit", is64bit)) continue;
11101113
if (xp.parse_str("cpu_feature", buf, sizeof(buf))) {
11111114
cpu_features.push_back(" " + (string)buf + " ");
@@ -1244,14 +1247,14 @@ int PLAN_CLASS_SPECS::parse_specs(FILE* f) {
12441247
return ERR_XML_PARSE;
12451248
}
12461249

1247-
12481250
PLAN_CLASS_SPEC::PLAN_CLASS_SPEC() {
12491251
strcpy(name, "");
12501252
strcpy(gpu_type, "");
12511253
cuda = false;
12521254
cal = false;
12531255
opencl = false;
12541256
virtualbox = false;
1257+
wsl = false;
12551258
is64bit = false;
12561259
min_ncpus = 0;
12571260
max_threads = 1;

0 commit comments

Comments
 (0)