--- gvpe/src/vped.C 2003/03/01 15:53:03 1.1 +++ gvpe/src/vped.C 2003/03/06 18:43:07 1.2 @@ -47,6 +47,8 @@ vpn network; +static loglevel llevel = L_NONE; + /* If nonzero, display usage information and exit. */ static int show_help; @@ -128,11 +130,9 @@ case 'l': /* inc debug level */ { - loglevel l = string_to_loglevel (optarg); + llevel = string_to_loglevel (optarg); - if (l != L_NONE) - set_loglevel (l); - else + if (llevel == L_NONE) slog (L_WARN, "'%s': %s", optarg, UNKNOWN_LOGLEVEL); } break; @@ -246,11 +246,11 @@ make_names (); conf.read_config (true); - RAND_load_file ("/dev/urandom", 1024); + set_loglevel (llevel != L_NONE ? llevel : conf.llevel); - //OpenSSL_add_all_algorithms (); + RAND_load_file ("/dev/urandom", 1024); - if (!THISNODE) + if (!thisnode) { slog (L_ERR, _("current node not set, or node '%s' not found in configfile, use the -n switch when starting vped."), thisnode ? thisnode : "");