comparison src/os/unix/ngx_linux_sendfile_chain.c @ 5557:188481078faf

Use ngx_socket_errno where appropriate. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
author Piotr Sikora <piotr@cloudflare.com>
date Mon, 03 Feb 2014 14:17:17 -0800
parents bdb3588681c9
children f9c83484d9ce
comparison
equal deleted inserted replaced
5556:4006bf77943b 5557:188481078faf
161 tcp_nodelay = 0; 161 tcp_nodelay = 0;
162 162
163 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, 163 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
164 (const void *) &tcp_nodelay, sizeof(int)) == -1) 164 (const void *) &tcp_nodelay, sizeof(int)) == -1)
165 { 165 {
166 err = ngx_errno; 166 err = ngx_socket_errno;
167 167
168 /* 168 /*
169 * there is a tiny chance to be interrupted, however, 169 * there is a tiny chance to be interrupted, however,
170 * we continue a processing with the TCP_NODELAY 170 * we continue a processing with the TCP_NODELAY
171 * and without the TCP_CORK 171 * and without the TCP_CORK
187 } 187 }
188 188
189 if (c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) { 189 if (c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) {
190 190
191 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) { 191 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) {
192 err = ngx_errno; 192 err = ngx_socket_errno;
193 193
194 /* 194 /*
195 * there is a tiny chance to be interrupted, however, 195 * there is a tiny chance to be interrupted, however,
196 * we continue a processing without the TCP_CORK 196 * we continue a processing without the TCP_CORK
197 */ 197 */