Set Accounting-Response in post-proxy fail
authorAlan T. DeKok <aland@freeradius.org>
Sun, 15 Feb 2009 10:31:23 +0000 (11:31 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 15 Feb 2009 10:31:23 +0000 (11:31 +0100)
src/modules/rlm_detail/rlm_detail.c

index 180109b..936a5c0 100644 (file)
@@ -546,7 +546,13 @@ static int detail_post_proxy(void *instance, REQUEST *request)
         *      it's doing normal accounting.
         */
        if (!request->proxy_reply) {
-               return detail_accounting(instance, request);
+               int rcode;
+
+               rcode = detail_accounting(instance, request);
+               if (rcode == RLM_MODULE_OK) {
+                       request->reply->code = PW_ACCOUNTING_RESPONSE;
+               }
+               return rcode;
        }
 
        return RLM_MODULE_NOOP;