ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vped.C
(Generate patch)

Comparing gvpe/src/vped.C (file contents):
Revision 1.1 by pcg, Sat Mar 1 15:53:03 2003 UTC vs.
Revision 1.2 by pcg, Thu Mar 6 18:43:07 2003 UTC

45#include "util.h" 45#include "util.h"
46#include "protocol.h" 46#include "protocol.h"
47 47
48vpn network; 48vpn network;
49 49
50static loglevel llevel = L_NONE;
51
50/* If nonzero, display usage information and exit. */ 52/* If nonzero, display usage information and exit. */
51static int show_help; 53static int show_help;
52 54
53/* If nonzero, print the version on standard output and exit. */ 55/* If nonzero, print the version on standard output and exit. */
54static int show_version; 56static int show_version;
126 break; 128 break;
127#endif 129#endif
128 130
129 case 'l': /* inc debug level */ 131 case 'l': /* inc debug level */
130 { 132 {
131 loglevel l = string_to_loglevel (optarg); 133 llevel = string_to_loglevel (optarg);
132 134
133 if (l != L_NONE) 135 if (llevel == L_NONE)
134 set_loglevel (l);
135 else
136 slog (L_WARN, "'%s': %s", optarg, UNKNOWN_LOGLEVEL); 136 slog (L_WARN, "'%s': %s", optarg, UNKNOWN_LOGLEVEL);
137 } 137 }
138 break; 138 break;
139 139
140 case '?': 140 case '?':
244#endif 244#endif
245 245
246 make_names (); 246 make_names ();
247 conf.read_config (true); 247 conf.read_config (true);
248 248
249 set_loglevel (llevel != L_NONE ? llevel : conf.llevel);
250
249 RAND_load_file ("/dev/urandom", 1024); 251 RAND_load_file ("/dev/urandom", 1024);
250 252
251 //OpenSSL_add_all_algorithms (); 253 if (!thisnode)
252
253 if (!THISNODE)
254 { 254 {
255 slog (L_ERR, _("current node not set, or node '%s' not found in configfile, use the -n switch when starting vped."), 255 slog (L_ERR, _("current node not set, or node '%s' not found in configfile, use the -n switch when starting vped."),
256 thisnode ? thisnode : "<unset>"); 256 thisnode ? thisnode : "<unset>");
257 exit (1); 257 exit (1);
258 } 258 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines