Skip to content

Commit

Permalink
completed new logvars backport
Browse files Browse the repository at this point in the history
  • Loading branch information
unbit committed Jan 28, 2013
1 parent 02d76f1 commit 46d7d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/logging.c
Expand Up @@ -819,7 +819,7 @@ void uwsgi_logit_lf(struct wsgi_request *wsgi_req) {
while (logchunk) {
int pos = logchunk->vec;
// raw string
if (logchunk->type == 0 && logchunk->type != 0) {
if (logchunk->type == 0) {
uwsgi.logvectors[wsgi_req->async_id][pos].iov_base = logchunk->ptr;
uwsgi.logvectors[wsgi_req->async_id][pos].iov_len = logchunk->len;
}
Expand Down Expand Up @@ -853,7 +853,7 @@ void uwsgi_logit_lf(struct wsgi_request *wsgi_req) {
}
}

if (uwsgi.logvectors[wsgi_req->async_id][pos].iov_len == 0) {
if (uwsgi.logvectors[wsgi_req->async_id][pos].iov_len == 0 && logchunk->type != 0) {
uwsgi.logvectors[wsgi_req->async_id][pos].iov_base = (char *) empty_var;
uwsgi.logvectors[wsgi_req->async_id][pos].iov_len = 1;
}
Expand Down

0 comments on commit 46d7d4b

Please sign in to comment.