comparison src/event/modules/ngx_eventport_module.c @ 332:2eea67ed0bc2 NGINX_0_5_36

nginx 0.5.36 *) Bugfix: the "sub_filter" directive might set text to change into output. *) Bugfix: a segmentation fault occurred in worker process, if empty stub block was used second time in SSI. *) Bugfix: the "proxy_store" and "fastcgi_store" directives did not check a response length. *) Bugfix: nginx issued the bogus error message "SSL_shutdown() failed (SSL: )"; bug appeared in 0.5.35. *) Bugfix: in HTTPS mode requests might fail with the "bad write retry" error; bug appeared in 0.5.35. *) Bugfix: the "fastcgi_catch_stderr" directive did return error code; now it returns 502 code, that can be rerouted to a next server using the "fastcgi_next_upstream invalid_header" directive. *) Bugfix: a segmentation fault occurred in master process if the "fastcgi_catch_stderr" directive was used; bug appeared in 0.5.32. Thanks to Manlio Perillo.
author Igor Sysoev <http://sysoev.ru>
date Sun, 04 May 2008 00:00:00 +0400
parents f70f2f565fe0
children
comparison
equal deleted inserted replaced
331:27fb10cee3fd 332:2eea67ed0bc2
38 typedef struct port_notify { 38 typedef struct port_notify {
39 int portnfy_port; /* bind request(s) to port */ 39 int portnfy_port; /* bind request(s) to port */
40 void *portnfy_user; /* user defined */ 40 void *portnfy_user; /* user defined */
41 } port_notify_t; 41 } port_notify_t;
42 42
43 #if (__FreeBSD_version < 700005)
44
43 typedef struct itimerspec { /* definition per POSIX.4 */ 45 typedef struct itimerspec { /* definition per POSIX.4 */
44 struct timespec it_interval;/* timer period */ 46 struct timespec it_interval;/* timer period */
45 struct timespec it_value; /* timer expiration */ 47 struct timespec it_value; /* timer expiration */
46 } itimerspec_t; 48 } itimerspec_t;
49
50 #endif
47 51
48 int port_create(void) 52 int port_create(void)
49 { 53 {
50 return -1; 54 return -1;
51 } 55 }
104 static char *ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf); 108 static char *ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf);
105 109
106 static int ep = -1; 110 static int ep = -1;
107 static port_event_t *event_list; 111 static port_event_t *event_list;
108 static ngx_uint_t nevents; 112 static ngx_uint_t nevents;
109 static timer_t event_timer = -1; 113 static timer_t event_timer = (timer_t) -1;
110 114
111 static ngx_str_t eventport_name = ngx_string("eventport"); 115 static ngx_str_t eventport_name = ngx_string("eventport");
112 116
113 117
114 static ngx_command_t ngx_eventport_commands[] = { 118 static ngx_command_t ngx_eventport_commands[] = {
235 239
236 240
237 static void 241 static void
238 ngx_eventport_done(ngx_cycle_t *cycle) 242 ngx_eventport_done(ngx_cycle_t *cycle)
239 { 243 {
240 if (event_timer != -1) { 244 if (event_timer != (timer_t) -1) {
241 if (timer_delete(event_timer) == -1) { 245 if (timer_delete(event_timer) == -1) {
242 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, 246 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
243 "timer_delete() failed"); 247 "timer_delete() failed");
244 } 248 }
245 249
246 event_timer = -1; 250 event_timer = (timer_t) -1;
247 } 251 }
248 252
249 if (close(ep) == -1) { 253 if (close(ep) == -1) {
250 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, 254 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
251 "close() event port failed"); 255 "close() event port failed");