comparison src/os/unix/ngx_linux_aio_read.c @ 542:2b9e388c61f1 NGINX_0_8_23

nginx 0.8.23 *) Security: now SSL/TLS renegotiation is disabled. Thanks to Maxim Dounin. *) Bugfix: listen unix domain socket did not inherit while online upgrade. *) Bugfix: the "unix:" parameter of the "set_real_ip_from" directive did not without yet another directive with any IP address. *) Bugfix: segmentation fault and infinite looping in resolver. *) Bugfix: in resolver. Thanks to Artem Bokhan.
author Igor Sysoev <http://sysoev.ru>
date Wed, 11 Nov 2009 00:00:00 +0300
parents 86dad910eeb6
children c5122335e41d
comparison
equal deleted inserted replaced
541:8da5668048b4 542:2b9e388c61f1
25 25
26 ssize_t 26 ssize_t
27 ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset, 27 ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset,
28 ngx_pool_t *pool) 28 ngx_pool_t *pool)
29 { 29 {
30 long n; 30 long n;
31 struct iocb *piocb[1]; 31 struct iocb *piocb[1];
32 ngx_event_t *ev; 32 ngx_event_t *ev;
33 ngx_event_aio_t *aio; 33 ngx_event_aio_t *aio;
34 static ngx_uint_t enosys = 0;
35 34
36 if (enosys) { 35 if (!ngx_file_aio) {
37 return ngx_read_file(file, buf, size, offset); 36 return ngx_read_file(file, buf, size, offset);
38 } 37 }
39 38
40 aio = file->aio; 39 aio = file->aio;
41 40
107 106
108 ngx_log_error(NGX_LOG_CRIT, file->log, n, 107 ngx_log_error(NGX_LOG_CRIT, file->log, n,
109 "io_submit(\"%V\") failed", &file->name); 108 "io_submit(\"%V\") failed", &file->name);
110 109
111 if (n == NGX_ENOSYS) { 110 if (n == NGX_ENOSYS) {
112 enosys = 1; 111 ngx_file_aio = 0;
113 return ngx_read_file(file, buf, size, offset); 112 return ngx_read_file(file, buf, size, offset);
114 } 113 }
115 114
116 return NGX_ERROR; 115 return NGX_ERROR;
117 } 116 }