From c0edbcce58b03b89c70f1eb39cb44c74c4c7453a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 21 Oct 2004 15:34:38 +0000 Subject: nginx-0.1.2-RELEASE import *) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS options in configure. *) Feature: the server_name directive supports *.domain.tld. *) Bugfix: the portability improvements. *) Bugfix: if configuration file was set in command line, the reconfiguration was impossible; the bug had appeared in 0.1.1. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used. *) Bugfix: with sendfile the response was not recoded according to the charset module directives; the bug had appeared in 0.1.1. *) Bugfix: very seldom bug in the kqueue processing. *) Bugfix: the gzip module compressed the proxied responses that was already compressed. --- src/os/unix/ngx_files.c | 56 ------------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'src/os/unix/ngx_files.c') diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index 8603ab2d9..f2ba3a451 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -210,59 +210,3 @@ int ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir) return NGX_OK; } - - -#if 0 - -ssize_t ngx_read_file(ngx_file_t *file, char *buf, size_t size, off_t offset) -{ - if (!file->read->ready) { - - ngx_memzero(&file->iocb, sizeof(iocb)); - file->iocb.aio_fildes = file->fd; - file->iocb.aio_buf = buf; - file->iocb.aio_nbytes = size; - file->iocb.aio_offset = offset; -#if (USE_AIO_KQUEUE) - file->iocb.aio_sigevent.sigev_notify = SIGEV_KEVENT; - file->iocb.aio_sigevent.sigev_notify_kqueue = tid->kq; - file->iocb.aio_sigevent.sigev_value = (union sigval) file; -#endif -#if (USE_AIO_SIGNAL) - file->iocb.aio_sigevent.sigev_notify = SIGEV_SIGNAL; - file->iocb.aio_sigevent.sigev_signo = NGX_SIGAIO; -#ifndef __FreeBSD__ - file->iocb.aio_sigevent.sigev_value.sival_ptr = file; -#endif -#endif - - if (aio_read(&file->iocb) == -1) { - ngx_log_error(NGX_LOG_ERR, file->log, ngx_errno, - "aio_read() failed"); - return NGX_ERROR; - - n = aio_error(&file->iocb); - if (n == EINPROGRESS) - return NGX_AGAIN; - - if (n == -1) { - ngx_log_error(NGX_LOG_ERR, file->log, ngx_errno, - "aio_read() failed"); - return NGX_ERROR; - } - } - - ngx_assert(file->iocb.aio_buf == buf), return NGX_ERROR, - "ngx_aio_read_file: another buffer is passed"); - - n = aio_return(&file->iocb); - if (n == -1) { - ngx_log_error(NGX_LOG_ERR, file->log, ngx_errno, - "aio_read() failed"); - return NGX_ERROR; - } - - return n; -} - -#endif -- cgit v1.2.3