From a0b4520dc78864889e93ab3ee5583bcd908c6c41 Mon Sep 17 00:00:00 2001 From: kolla Date: Thu, 2 Apr 2009 11:54:43 +0000 Subject: Ouptut "replyh: passing reply to client" as WARN (level 2) when reply message is either Access_Accept, Access_Reject or Accounting_Response - usefull for "normal logging" git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@497 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radsecproxy.c b/radsecproxy.c index 09edb74..28ee2e0 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1676,7 +1676,11 @@ void replyh(struct server *server, unsigned char *buf) { if (ttlres == -1 && (options.addttl || from->conf->addttl)) addttlattr(msg, options.ttlattrtype, from->conf->addttl ? from->conf->addttl : options.addttl); - debug(DBG_INFO, "replyh: passing reply to client %s (%s)", from->conf->name, addr2string(from->addr)); + if (msg->code == RAD_Access_Accept || msg->code == RAD_Access_Reject || msg->code == RAD_Accounting_Response) + debug(DBG_WARN, "replyh: passing reply to client %s (%s)", from->conf->name, addr2string(from->addr)); + else + debug(DBG_INFO, "replyh: passing reply to client %s (%s)", from->conf->name, addr2string(from->addr)); + radmsg_free(rqout->rq->msg); rqout->rq->msg = msg; sendreply(newrqref(rqout->rq)); -- cgit v1.1