save the old errno of the sendfile() call in case that the attr_get()

fails in stat-cache-get-entry 


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1386 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.13
Jan Kneschke 16 years ago
parent d6bfa8aaa8
commit a0aafd9a24
  1. 4
      src/network_linux_sendfile.c

@ -175,6 +175,7 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
}
if (r == 0) {
int oerrno = errno;
/* We got an event to write but we wrote nothing
*
* - the file shrinked -> error
@ -187,9 +188,12 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
if (offset > sce->st.st_size) {
/* file shrinked, close the connection */
errno = oerrno;
return -1;
}
errno = oerrno;
return -2;
}

Loading…
Cancel
Save