diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-09-21 08:08:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-09-21 08:08:04 +0000 |
commit | d91a79d86ffb544d49f5f04ca49e5d980188934d (patch) | |
tree | a2ad05f500f950bc9c4270bebd95f4e0adc3ae98 | |
parent | d5f3217875ca86f6d4c0714c86c1eb8cbe232740 (diff) | |
download | tipidee-d91a79d86ffb544d49f5f04ca49e5d980188934d.tar.xz |
A few fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r-- | doc/quickstart.html | 2 | ||||
-rw-r--r-- | src/tipideed/send_file.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/doc/quickstart.html b/doc/quickstart.html index 40586a9..f9627f5 100644 --- a/doc/quickstart.html +++ b/doc/quickstart.html @@ -49,7 +49,7 @@ in the <tt>/home/www/docs</tt> directory, and do the same with <tt>example.org</ <ul> <li> You need one long-running process per port you want tipidee to serve. If you want to serve HTTP on port 80 and HTTPS on port 443, then you'll need -two services. Or four if you want to serve on both IPv4 and IPv6 adresses. </li> +two services. Or four if you want to serve on both IPv4 and IPv6 addresses. </li> <li> Start these processes in the <tt>/home/www</tt> directory, the base for all the domains you're serving. </li> <li> Assuming you want to run the server as user <tt>www</tt>, and your diff --git a/src/tipideed/send_file.c b/src/tipideed/send_file.c index 77b49dd..2ee122a 100644 --- a/src/tipideed/send_file.c +++ b/src/tipideed/send_file.c @@ -103,17 +103,16 @@ void send_file (int fd, uint64_t n, char const *fn) ssize_t r ; buffer_rpeek(buffer_1, v) ; r = allreadv(fd, v, 2) ; - if (r > n) if (r == -1) strerr_diefu2sys(111, "read from ", fn) ; if (!r) strerr_diefu3x(111, "serve ", fn, ": file was truncated") ; if (r > n) { r = n ; if (g.verbosity >= 2) - strerr_warnw2x("serving elongated file: ", fn) + strerr_warnw2x("serving elongated file: ", fn) ; } - buffer_rseek(b, r) ; - tain_add_g(&deadline, g.writetto) ; + buffer_rseek(buffer_1, r) ; + tain_add_g(&deadline, &g.writetto) ; if (!buffer_timed_flush_g(buffer_1, &deadline)) strerr_diefu1sys(111, "write to stdout") ; n -= r ; |