Rename DEBUG_LOG and FTICKS_LOG.
authorLinus Nordberg <linus@nordu.net>
Mon, 12 Dec 2011 13:07:26 +0000 (14:07 +0100)
committerLinus Nordberg <linus@nordu.net>
Mon, 12 Dec 2011 13:07:26 +0000 (14:07 +0100)
debug.c
debug.h
radsecproxy.c

diff --git a/debug.c b/debug.c
index 2ec8ef3..3b3a7fd 100644 (file)
--- a/debug.c
+++ b/debug.c
@@ -80,7 +80,7 @@ int debug_set_destination(char *dest, int log_type) {
     int i;
 
     if (!strncasecmp(dest, "file:///", 8)) {
-       if (log_type != FTICKS_LOG) {
+       if (log_type != LOG_TYPE_FTICKS) {
            debug_filepath = stringcopy(dest + 7, 0);
            debug_file = fopen(debug_filepath, "a");
            if (!debug_file) {
@@ -95,7 +95,7 @@ int debug_set_destination(char *dest, int log_type) {
        }
        return 1;
     }
-    if (!strncasecmp(dest, "x-syslog://", 11) || log_type == FTICKS_LOG) {
+    if (!strncasecmp(dest, "x-syslog://", 11) || log_type == LOG_TYPE_FTICKS) {
        if (!strncasecmp(dest, "x-syslog://", 11)) {
             dest += 11;
             if (*dest == '/')
@@ -107,14 +107,14 @@ int debug_set_destination(char *dest, int log_type) {
                    break;
            if (!facstrings[i])
                debugx(1, DBG_ERR, "Unknown syslog facility %s", dest);
-           if (log_type != FTICKS_LOG)
+           if (log_type != LOG_TYPE_FTICKS)
                debug_syslogfacility = facvals[i];
 #if defined(WANT_FTICKS)
-            else if (log_type == FTICKS_LOG)
+            else if (log_type == LOG_TYPE_FTICKS)
                fticks_syslogfacility = facvals[i];
 #endif
        } else {
-            if (log_type != FTICKS_LOG)
+            if (log_type != LOG_TYPE_FTICKS)
                 debug_syslogfacility = LOG_DAEMON;
 #if defined(WANT_FTICKS)
             else if (log_type == FTICKS_LOG)
diff --git a/debug.h b/debug.h
index 8c53c3c..3ed751c 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -17,8 +17,8 @@
 #define DBG_WARN 64
 #define DBG_ERR 128
 
-#define DEBUG_LOG 0
-#define FTICKS_LOG 1
+#define LOG_TYPE_DEBUG 0
+#define LOG_TYPE_FTICKS 1
 
 void debug_init(char *ident);
 void debug_set_level(uint8_t level);
index e780b96..a2e6eab 100644 (file)
@@ -3243,10 +3243,11 @@ int radsecproxy_main(int argc, char **argv) {
     if (!foreground) {
        debug_set_destination(options.logdestination
                               ? options.logdestination
-                              : "x-syslog:///", DEBUG_LOG);
+                              : "x-syslog:///", LOG_TYPE_DEBUG);
 #if defined(WANT_FTICKS)
        if (options.ftickssyslogfacility) {
-            debug_set_destination(options.ftickssyslogfacility, FTICKS_LOG);
+            debug_set_destination(options.ftickssyslogfacility,
+                                  LOG_TYPE_FTICKS);
             free(options.ftickssyslogfacility);
        }
 #endif