Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea4e672
)
accesslog: Fixed non-ASCII logging bug again.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 27 Feb 2014 06:44:50 +0000
(07:44 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 27 Feb 2014 06:44:50 +0000
(07:44 +0100)
src/accesslog.c
patch
|
blob
|
blame
|
history
diff --git
a/src/accesslog.c
b/src/accesslog.c
index
f17eebe
..
88b61b3
100644
(file)
--- a/
src/accesslog.c
+++ b/
src/accesslog.c
@@
-46,8
+46,10
@@
static char *format;
static struct timeval now;
static volatile int reopen = 0;
-static void qputs(char *s, FILE *o)
+static void qputs(char *s
p
, FILE *o)
{
+ unsigned char *s = (unsigned char *)sp;
+
for(; *s; s++) {
if(*s == '\"') {
fputs("\\\"", o);
@@
-58,7
+60,7
@@
static void qputs(char *s, FILE *o)
} else if(*s == '\t') {
fputs("\\t", o);
} else if((*s < 32) || (*s >= 128)) {
- fprintf(o, "\\x%02x", (int)
(unsigned char)
*s);
+ fprintf(o, "\\x%02x", (int)*s);
} else {
fputc(*s, o);
}