summaryrefslogtreecommitdiff
path: root/src/mod_cgi.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-07 00:36:52 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-12 21:56:05 -0500
commit8c0792a58c24d6f3dd07071d3694e90281cdf3ce (patch)
tree9de4102438080eeb4a50682cd1b4a76c665dae7c /src/mod_cgi.c
parent3d8d56d8decd1ffc677dea8c72aa620f4c4fa69f (diff)
downloadlighttpd-git-8c0792a58c24d6f3dd07071d3694e90281cdf3ce.tar.gz
[multiple] better packing of struct chunk
remove c->file.name previous commit modified c->file.name to share buffer with c->mem
Diffstat (limited to 'src/mod_cgi.c')
-rw-r--r--src/mod_cgi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_cgi.c b/src/mod_cgi.c
index 3fe65078..50650378 100644
--- a/src/mod_cgi.c
+++ b/src/mod_cgi.c
@@ -524,8 +524,8 @@ static ssize_t cgi_write_file_chunk_mmap(server *srv, connection *con, int fd, c
/*(simplified from chunk.c:chunkqueue_open_file_chunk())*/
UNUSED(con);
if (-1 == c->file.fd) {
- if (-1 == (c->file.fd = fdevent_open_cloexec(c->file.name->ptr, O_RDONLY, 0))) {
- log_error_write(srv, __FILE__, __LINE__, "ssb", "open failed:", strerror(errno), c->file.name);
+ if (-1 == (c->file.fd = fdevent_open_cloexec(c->mem->ptr, O_RDONLY, 0))) {
+ log_error_write(srv, __FILE__, __LINE__, "ssb", "open failed:", strerror(errno), c->mem);
return -1;
}
}
@@ -551,10 +551,10 @@ static ssize_t cgi_write_file_chunk_mmap(server *srv, connection *con, int fd, c
|| 0 >= (toSend = read(c->file.fd, data, toSend))) {
if (-1 == toSend) {
log_error_write(srv, __FILE__, __LINE__, "ssbdo", "lseek/read failed:",
- strerror(errno), c->file.name, c->file.fd, offset);
+ strerror(errno), c->mem, c->file.fd, offset);
} else { /*(0 == toSend)*/
log_error_write(srv, __FILE__, __LINE__, "sbdo", "unexpected EOF (input truncated?):",
- c->file.name, c->file.fd, offset);
+ c->mem, c->file.fd, offset);
}
free(data);
return -1;