diff options
author | Linus Nordberg <linus@nordberg.se> | 2010-06-02 20:50:26 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2010-06-02 20:50:26 +0200 |
commit | 0700c82ab1b0a12841c4eb4122dbe76d8c74d2be (patch) | |
tree | 3b544f5a17f1e1de3db5593c6ae28ab0401efd1a | |
parent | 6df48ad13f8c0583f04cefab6eea725d742f426a (diff) |
* README: Correct number of debug levels.
* radsecproxy.c (getmainconfig): Take new log level into account.
(getargs): Ditto.
Patch by Kolbjørn Barmen.
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | radsecproxy.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -22,8 +22,8 @@ http://software.uninett.no/radsecproxy/?page=documentation There are five options that may be specified on the command line. "-c configfile" to specify a non-default config file path; -"-d loglevel" to set a loglevel of 1, 2, 3 or 4 where 4 is the most -detailed; and "-f" to run the proxy in the foreground with logging +"-d loglevel" to set a loglevel of 1, 2, 3, 4 and 5 where 5 is the +most detailed; and "-f" to run the proxy in the foreground with logging to stderr. Without "-f" the default is to detach as a daemon and log to syslog. "-v" just prints version information and exits, while "-p" (pretend) makes the proxy go through the configuration files as diff --git a/radsecproxy.c b/radsecproxy.c index 5e50b96..2276d40 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -3061,7 +3061,7 @@ void getmainconfig(const char *configfile) { debugx(1, DBG_ERR, "configuration error"); if (loglevel != LONG_MIN) { - if (loglevel < 1 || loglevel > 4) + if (loglevel < 1 || loglevel > 5) debugx(1, DBG_ERR, "error in %s, value of option LogLevel is %d, must be 1, 2, 3, 4 or 5", configfile, loglevel); options.loglevel = (uint8_t)loglevel; } @@ -3087,7 +3087,7 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *pretend, uint8 *configfile = optarg; break; case 'd': - if (strlen(optarg) != 1 || *optarg < '1' || *optarg > '4') + if (strlen(optarg) != 1 || *optarg < '1' || *optarg > '5') debugx(1, DBG_ERR, "Debug level must be 1, 2, 3, 4 or 5, not %s", optarg); *loglevel = *optarg - '0'; break; |