Server: add missing code (parse cpu_model_regex in plan class spec)

This commit is contained in:
David Anderson 2018-05-29 17:10:13 -07:00
parent 99adec43ef
commit 8fa692c4d6
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<runtime?php
<?php
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California

View File

@ -983,6 +983,14 @@ int PLAN_CLASS_SPEC::parse(XML_PARSER& xp) {
have_cpu_vendor_regex = true;
continue;
}
if (xp.parse_str("cpu_model_regex", buf, sizeof(buf))) {
if (regcomp(&(cpu_model_regex), buf, REG_EXTENDED|REG_NOSUB) ) {
log_messages.printf(MSG_CRITICAL, "BAD CPU MODEL REGEXP: %s\n", buf);
return ERR_XML_PARSE;
}
have_cpu_model_regex = true;
continue;
}
if (xp.parse_str("host_summary_regex", buf, sizeof(buf))) {
if (regcomp(&(host_summary_regex), buf, REG_EXTENDED|REG_NOSUB) ) {
log_messages.printf(MSG_CRITICAL, "BAD HOST SUMMARY REGEXP: %s\n", buf);