aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_linux_sendfile_chain.c
diff options
context:
space:
mode:
authorPiotr Sikora <piotr@cloudflare.com>2014-02-03 14:17:17 -0800
committerPiotr Sikora <piotr@cloudflare.com>2014-02-03 14:17:17 -0800
commitab3c0f9250f248b37aac9f79359a773f06baa831 (patch)
treeb51d05aa4beba2b966bf118f834be122638ad207 /src/os/unix/ngx_linux_sendfile_chain.c
parent07aef702eecc784b0eda19a673d9a76939a7ca67 (diff)
downloadnginx-ab3c0f9250f248b37aac9f79359a773f06baa831.tar.gz
nginx-ab3c0f9250f248b37aac9f79359a773f06baa831.zip
Use ngx_socket_errno where appropriate.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
Diffstat (limited to 'src/os/unix/ngx_linux_sendfile_chain.c')
-rw-r--r--src/os/unix/ngx_linux_sendfile_chain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c
index 431542d42..16395f943 100644
--- a/src/os/unix/ngx_linux_sendfile_chain.c
+++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -163,7 +163,7 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
(const void *) &tcp_nodelay, sizeof(int)) == -1)
{
- err = ngx_errno;
+ err = ngx_socket_errno;
/*
* there is a tiny chance to be interrupted, however,
@@ -189,7 +189,7 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
if (c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) {
if (ngx_tcp_nopush(c->fd) == NGX_ERROR) {
- err = ngx_errno;
+ err = ngx_socket_errno;
/*
* there is a tiny chance to be interrupted, however,