corrected wrong initial scan loag message

This commit is contained in:
john30
2017-12-17 10:04:52 +01:00
parent 6bba2d6a02
commit ab5c350d24
+2 -4
View File
@@ -303,8 +303,7 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
argp_error(state, "scanconfig without polling may lead to invalid files included for certain products!"); argp_error(state, "scanconfig without polling may lead to invalid files included for certain products!");
return EINVAL; return EINVAL;
} }
if (arg != NULL) { if (!arg || arg[0] == 0 || strcmp("none", arg) == 0) {
if (arg[0] == 0 || strcmp("none", arg) == 0) {
opt->initialScan = ESC; opt->initialScan = ESC;
} else if (strcmp("full", arg) == 0) { } else if (strcmp("full", arg) == 0) {
opt->initialScan = SYN; opt->initialScan = SYN;
@@ -322,7 +321,6 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
argp_error(state, "cannot combine readonly with answer/generatesyn/initsend/scanconfig=*"); argp_error(state, "cannot combine readonly with answer/generatesyn/initsend/scanconfig=*");
return EINVAL; return EINVAL;
} }
}
break; break;
case O_CFGLNG: // --configlang=LANG case O_CFGLNG: // --configlang=LANG
opt->preferLanguage = arg; opt->preferLanguage = arg;
@@ -1191,7 +1189,7 @@ int main(int argc, char* argv[]) {
signal(SIGTERM, signalHandler); signal(SIGTERM, signalHandler);
logNotice(lf_main, PACKAGE_STRING "." REVISION " started%s", logNotice(lf_main, PACKAGE_STRING "." REVISION " started%s",
opt.scanConfig ? opt.initialScan == ESC ? " with scan" : opt.initialScan == BROADCAST ? " with broadcast scan" opt.scanConfig ? opt.initialScan == ESC ? " with auto scan" : opt.initialScan == BROADCAST ? " with broadcast scan"
: opt.initialScan == SYN ? " with full scan" : " with single scan" : ""); : opt.initialScan == SYN ? " with full scan" : " with single scan" : "");
// load configuration files // load configuration files