diff src/os/unix/ngx_files.c @ 4:4b2dafa26fe2 NGINX_0_1_2

nginx 0.1.2 *) 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; bug 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; bug 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.
author Igor Sysoev <http://sysoev.ru>
date Thu, 21 Oct 2004 00:00:00 +0400
parents f0b350454894
children 80ba094c6b3e
line wrap: on
line diff
--- 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_di
 
     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