Rename option to debug level
authorAlan T. DeKok <aland@freeradius.org>
Wed, 11 Mar 2015 13:59:55 +0000 (09:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 11 Mar 2015 14:05:49 +0000 (10:05 -0400)
src/include/radiusd.h
src/main/xlat.c

index 0153950..9a5321b 100644 (file)
@@ -271,11 +271,11 @@ struct rad_request {
 #endif
 };                             /* REQUEST typedef */
 
-#define RAD_REQUEST_OPTION_NONE                (0)
-#define RAD_REQUEST_OPTION_DEBUG       (1)
-#define RAD_REQUEST_OPTION_DEBUG2      (2)
-#define RAD_REQUEST_OPTION_DEBUG3      (3)
-#define RAD_REQUEST_OPTION_DEBUG4      (4)
+#define RAD_REQUEST_LVL_NONE           (0)
+#define RAD_REQUEST_LVL_DEBUG  (1)
+#define RAD_REQUEST_LVL_DEBUG2 (2)
+#define RAD_REQUEST_LVL_DEBUG3 (3)
+#define RAD_REQUEST_LVL_DEBUG4 (4)
 
 #define RAD_REQUEST_OPTION_COA         (1 << 0)
 #define RAD_REQUEST_OPTION_CTX         (1 << 1)
index 8341562..e88ddfa 100644 (file)
@@ -635,7 +635,7 @@ static ssize_t xlat_debug(UNUSED void *instance, REQUEST *request,
        /*
         *  Expand to previous (or current) level
         */
-       snprintf(out, outlen, "%d", request->log.lvl & RAD_REQUEST_OPTION_DEBUG4);
+       snprintf(out, outlen, "%d", request->log.lvl & RAD_REQUEST_LVL_DEBUG4);
 
        /*
         *  Assume we just want to get the current value and NOT set it to 0
@@ -645,7 +645,7 @@ static ssize_t xlat_debug(UNUSED void *instance, REQUEST *request,
 
        level = atoi(fmt);
        if (level == 0) {
-               request->log.lvl = RAD_REQUEST_OPTION_NONE;
+               request->log.lvl = RAD_REQUEST_LVL_NONE;
                request->log.func = NULL;
        } else {
                if (level > 4) level = 4;