Mercurial > hg > nginx-vendor-0-5
comparison src/event/modules/ngx_select_module.c @ 326:f70f2f565fe0 NGINX_0_5_33
nginx 0.5.33
*) Change: now by default the "echo" SSI command uses entity encoding.
*) Feature: the "encoding" parameter in the "echo" SSI command.
*) Change: mail proxy was split on three modules: pop3, imap and smtp.
*) Feature: the --without-mail_pop3_module, --without-mail_imap_module,
and --without-mail_smtp_module configuration parameters.
*) Feature: the "smtp_greeting_delay" and "smtp_client_buffer"
directives of the ngx_mail_smtp_module.
*) Feature: the "server_name" and "valid_referers" directives support
regular expressions.
*) Feature: the "server_name", "map", and "valid_referers" directives
support the "www.example.*" wildcards.
*) Bugfix: sub_filter did not work with empty substitution.
*) Bugfix: in sub_filter parsing.
*) Bugfix: a worker process may got caught in an endless loop, if the
memcached was used.
*) Bugfix: nginx supported low case only "close" and "keep-alive"
values in the "Connection" request header line; bug appeared in
0.5.32.
*) Bugfix: nginx could not start on Solaris if the shared PCRE library
located in non-standard place was used.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 07 Nov 2007 00:00:00 +0300 |
parents | c982febb7588 |
children |
comparison
equal
deleted
inserted
replaced
325:5bb1b28ddeaa | 326:f70f2f565fe0 |
---|---|
10 | 10 |
11 | 11 |
12 | 12 |
13 static ngx_int_t ngx_select_init(ngx_cycle_t *cycle, ngx_msec_t timer); | 13 static ngx_int_t ngx_select_init(ngx_cycle_t *cycle, ngx_msec_t timer); |
14 static void ngx_select_done(ngx_cycle_t *cycle); | 14 static void ngx_select_done(ngx_cycle_t *cycle); |
15 static ngx_int_t ngx_select_add_event(ngx_event_t *ev, int event, u_int flags); | 15 static ngx_int_t ngx_select_add_event(ngx_event_t *ev, ngx_int_t event, |
16 static ngx_int_t ngx_select_del_event(ngx_event_t *ev, int event, u_int flags); | 16 ngx_uint_t flags); |
17 static ngx_int_t ngx_select_del_event(ngx_event_t *ev, ngx_int_t event, | |
18 ngx_uint_t flags); | |
17 static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, | 19 static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, |
18 ngx_uint_t flags); | 20 ngx_uint_t flags); |
19 static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf); | 21 static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf); |
20 | 22 |
21 | 23 |
23 static fd_set master_write_fd_set; | 25 static fd_set master_write_fd_set; |
24 static fd_set work_read_fd_set; | 26 static fd_set work_read_fd_set; |
25 static fd_set work_write_fd_set; | 27 static fd_set work_write_fd_set; |
26 | 28 |
27 #if (NGX_WIN32) | 29 #if (NGX_WIN32) |
28 static int max_read; | 30 static ngx_uint_t max_read; |
29 static int max_write; | 31 static ngx_uint_t max_write; |
30 #else | 32 #else |
31 static int max_fd; | 33 static ngx_int_t max_fd; |
32 #endif | 34 #endif |
33 | 35 |
34 static ngx_uint_t nevents; | 36 static ngx_uint_t nevents; |
35 | 37 |
36 static ngx_event_t **event_index; | 38 static ngx_event_t **event_index; |
127 event_index = NULL; | 129 event_index = NULL; |
128 } | 130 } |
129 | 131 |
130 | 132 |
131 static ngx_int_t | 133 static ngx_int_t |
132 ngx_select_add_event(ngx_event_t *ev, int event, u_int flags) | 134 ngx_select_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) |
133 { | 135 { |
134 ngx_connection_t *c; | 136 ngx_connection_t *c; |
135 | 137 |
136 c = ev->data; | 138 c = ev->data; |
137 | 139 |
138 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0, | 140 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0, |
139 "select add event fd:%d ev:%d", c->fd, event); | 141 "select add event fd:%d ev:%i", c->fd, event); |
140 | 142 |
141 if (ev->index != NGX_INVALID_INDEX) { | 143 if (ev->index != NGX_INVALID_INDEX) { |
142 ngx_log_error(NGX_LOG_ALERT, ev->log, 0, | 144 ngx_log_error(NGX_LOG_ALERT, ev->log, 0, |
143 "select event fd:%d ev:%d is already set", c->fd, event); | 145 "select event fd:%d ev:%i is already set", c->fd, event); |
144 return NGX_OK; | 146 return NGX_OK; |
145 } | 147 } |
146 | 148 |
147 #if (NGX_WIN32) | 149 #if (NGX_WIN32) |
148 | 150 |
188 return NGX_OK; | 190 return NGX_OK; |
189 } | 191 } |
190 | 192 |
191 | 193 |
192 static ngx_int_t | 194 static ngx_int_t |
193 ngx_select_del_event(ngx_event_t *ev, int event, u_int flags) | 195 ngx_select_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) |
194 { | 196 { |
195 ngx_connection_t *c; | 197 ngx_connection_t *c; |
196 | 198 |
197 c = ev->data; | 199 c = ev->data; |
198 | 200 |
201 if (ev->index == NGX_INVALID_INDEX) { | 203 if (ev->index == NGX_INVALID_INDEX) { |
202 return NGX_OK; | 204 return NGX_OK; |
203 } | 205 } |
204 | 206 |
205 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0, | 207 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0, |
206 "select del event fd:%d ev:%d", c->fd, event); | 208 "select del event fd:%d ev:%i", c->fd, event); |
207 | 209 |
208 #if (NGX_WIN32) | 210 #if (NGX_WIN32) |
209 | 211 |
210 if (event == NGX_READ_EVENT) { | 212 if (event == NGX_READ_EVENT) { |
211 FD_CLR(c->fd, &master_read_fd_set); | 213 FD_CLR(c->fd, &master_read_fd_set); |
229 max_fd = -1; | 231 max_fd = -1; |
230 } | 232 } |
231 | 233 |
232 #endif | 234 #endif |
233 | 235 |
234 if (ev->index < (u_int) --nevents) { | 236 if (ev->index < --nevents) { |
235 event_index[ev->index] = event_index[nevents]; | 237 event_index[ev->index] = event_index[nevents]; |
236 event_index[ev->index]->index = ev->index; | 238 event_index[ev->index]->index = ev->index; |
237 } | 239 } |
238 | 240 |
239 ev->index = NGX_INVALID_INDEX; | 241 ev->index = NGX_INVALID_INDEX; |