summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'log.c')
-rw-r--r--log.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/log.c b/log.c
index 43a0a5a..6f8f622 100644
--- a/log.c
+++ b/log.c
@@ -13,7 +13,7 @@
* message authentication based on the methodes used by SRTP. It is
* intended to deliver a generic, scaleable and secure solution for
* tunneling and relaying of packets of any protocol.
- *
+ *
*
* Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
*
@@ -39,6 +39,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
+#include <ctype.h>
#define SYSLOG_NAMES
#include <syslog.h>
@@ -84,7 +85,7 @@ int log_targets_target_exists(log_targets_t* targets, log_target_type_t type)
if(tmp->type_ == type)
return 1;
tmp = tmp->next_;
- }
+ }
return 0;
}
@@ -147,7 +148,7 @@ int log_targets_add(log_targets_t* targets, const char* conf)
log_target_t* tmp = targets->first_;
while(tmp->next_)
tmp = tmp->next_;
-
+
tmp->next_ = new_target;
}
return 0;
@@ -246,8 +247,8 @@ void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len)
int offset = snprintf(msg, MSG_LENGTH_MAX, "dump(%d): ", len);
if(offset < 0)
return;
- u_int8_t* ptr = &msg[offset];
-
+ char* ptr = &msg[offset];
+
for(i=0; i < len; i++) {
if(((i+1)*3) >= (MSG_LENGTH_MAX - offset))
break;