nginx-0.1.1-RELEASE import
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c
index 7d68884..ea1d19b 100644
--- a/src/event/modules/ngx_devpoll_module.c
+++ b/src/event/modules/ngx_devpoll_module.c
@@ -202,13 +202,7 @@
#endif
#if (NGX_READ_EVENT != POLLIN)
- if (event == NGX_READ_EVENT) {
- event = POLLOUT;
-#if (NGX_WRITE_EVENT != POLLOUT)
- } else {
- event = POLLIN;
-#endif
- }
+ event = (event == NGX_READ_EVENT) ? POLLIN : POLLOUT;
#endif
#if (NGX_DEBUG)
@@ -218,6 +212,7 @@
#endif
ev->active = 1;
+
return ngx_devpoll_set_event(ev, event, 0);
}
@@ -229,6 +224,10 @@
c = ev->data;
+#if (NGX_READ_EVENT != POLLIN)
+ event = (event == NGX_READ_EVENT) ? POLLIN : POLLOUT;
+#endif
+
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
"devpoll del event: fd:%d ev:%04X", c->fd, event);
@@ -242,13 +241,9 @@
return NGX_OK;
}
- /* we need to restore the second event if it exists */
+ /* restore the paired event if it exists */
- if (event == NGX_READ_EVENT) {
- if (ev->accept) {
- return NGX_OK;
- }
-
+ if (event == POLLIN) {
e = c->write;
event = POLLOUT;
@@ -257,7 +252,7 @@
event = POLLIN;
}
- if (e) {
+ if (e && e->active) {
return ngx_devpoll_set_event(e, event, 0);
}
@@ -273,7 +268,7 @@
c = ev->data;
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
- "devpoll fd:%d ev:%d fl:%d", c->fd, event, flags);
+ "devpoll fd:%d ev:%04X fl:%04X", c->fd, event, flags);
if (nchanges >= max_changes) {
ngx_log_error(NGX_LOG_WARN, ev->log, 0,
diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c
index 26b2c81..72c5b7c 100644
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -131,10 +131,6 @@
{
ngx_rtsig_conf_t *rtscf;
- if (ngx_poll_module_ctx.actions.init(cycle) == NGX_ERROR) {
- return NGX_ERROR;
- }
-
rtscf = ngx_event_get_conf(cycle->conf_ctx, ngx_rtsig_module);
sigemptyset(&set);
@@ -170,7 +166,9 @@
static void ngx_rtsig_done(ngx_cycle_t *cycle)
{
- ngx_poll_module_ctx.actions.done(cycle);
+ ngx_free(overflow_list);
+
+ overflow_list = NULL;
}
@@ -697,7 +695,7 @@
* the new overflow.
*
* Learn the /proc/sys/kernel/rtsig-max value because
- * it can be changed sisnce the last checking.
+ * it can be changed since the last checking.
*/
name[0] = CTL_KERN;