diff options
author | venaas <venaas> | 2007-10-11 11:12:38 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-10-11 11:12:38 +0000 |
commit | 1ec68212fcc2f69b3b04a2a4f7108b1a972ab61d (patch) | |
tree | 7156340f1181e8a095f20942a09fe784fc978057 | |
parent | 7bc2eef3286ec71909e3cc97397e1e61bdd36e29 (diff) |
fixed bug with servers being added after realm definitions
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.0@185 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r-- | radsecproxy.c | 6 | ||||
-rw-r--r-- | radsecproxy.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index 5e8af42..0e22bd6 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1186,7 +1186,7 @@ void radsrv(struct request *rq) { free(buf); return; } - to = realm->server; + to = servers + realm->serverno; if (to && rqinqueue(to, rq->from, id)) { debug(DBG_INFO, "radsrv: already got request from host %s with id %d, ignoring", rq->from->peer.host, id); @@ -1879,7 +1879,7 @@ void addrealm(char *value, char *server, char *message) { debugx(1, DBG_ERR, "ReplyMessage can be at most 253 bytes"); realm->message = message; if (server) - realm->server = servers + i; + realm->serverno = i; if (regcomp(&realm->regex, regex ? regex : value + 1, REG_ICASE | REG_NOSUB)) debugx(1, DBG_ERR, "addrealm: failed to compile regular expression %s", regex ? regex : value + 1); if (regex) @@ -2365,7 +2365,7 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *loglevel, char *foreground = 1; break; case 'v': - debugx(0, DBG_ERR, "radsecproxy 1.0"); + debugx(0, DBG_ERR, "radsecproxy 1.0p1"); default: goto usage; } diff --git a/radsecproxy.h b/radsecproxy.h index 4202d48..788a832 100644 --- a/radsecproxy.h +++ b/radsecproxy.h @@ -109,7 +109,7 @@ struct realm { char *name; char *message; regex_t regex; - struct server *server; + int serverno; }; struct tls { |