Ouptut "replyh: passing reply to client" as WARN (level 2) when reply message
authorkolla <kolla>
Thu, 2 Apr 2009 11:54:43 +0000 (11:54 +0000)
committerkolla <kolla@e88ac4ed-0b26-0410-9574-a7f39faa03bf>
Thu, 2 Apr 2009 11:54:43 +0000 (11:54 +0000)
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

index 09edb74..28ee2e0 100644 (file)
@@ -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));