mirror of https://github.com/BOINC/boinc.git
sample_substr_validator: bug fix for --reject_if_present
This commit is contained in:
parent
5c5f996809
commit
57e8f8cf5d
|
@ -31,19 +31,22 @@ char* stderr_string;
|
||||||
bool reject_if_present = false;
|
bool reject_if_present = false;
|
||||||
|
|
||||||
void parse_cmdline() {
|
void parse_cmdline() {
|
||||||
|
bool found = false;
|
||||||
for (int i=1; i<g_argc; i++) {
|
for (int i=1; i<g_argc; i++) {
|
||||||
if (!strcmp(g_argv[i], "--stderr_string")) {
|
if (!strcmp(g_argv[i], "--stderr_string")) {
|
||||||
stderr_string = g_argv[++i];
|
stderr_string = g_argv[++i];
|
||||||
return;
|
found = true;
|
||||||
}
|
}
|
||||||
if (!strcmp(g_argv[i], "--reject_if_present")) {
|
if (!strcmp(g_argv[i], "--reject_if_present")) {
|
||||||
reject_if_present = true;
|
reject_if_present = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!found) {
|
||||||
log_messages.printf(MSG_CRITICAL,
|
log_messages.printf(MSG_CRITICAL,
|
||||||
"--stderr_string missing from command line\n"
|
"--stderr_string missing from command line\n"
|
||||||
);
|
);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int init_result(RESULT& r, void*&) {
|
int init_result(RESULT& r, void*&) {
|
||||||
|
|
Loading…
Reference in New Issue