This commit is contained in:
agentzh (章亦春) 2012-06-07 17:50:33 +08:00
parent 938d3731c8
commit 914c4c5ac4
3 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,36 @@
--- nginx-1.0.15/src/event/modules/ngx_poll_module.c 2012-02-06 04:02:59.000000000 +0800
+++ nginx-1.0.15-patched/src/event/modules/ngx_poll_module.c 2012-06-07 17:22:43.538168219 +0800
@@ -205,19 +205,21 @@
event_list[ev->index] = event_list[nevents];
- c = ngx_cycle->files[event_list[nevents].fd];
+ if (ngx_cycle->files) {
+ c = ngx_cycle->files[event_list[nevents].fd];
- if (c->fd == -1) {
- ngx_log_error(NGX_LOG_ALERT, ev->log, 0,
- "unexpected last event");
-
- } else {
- if (c->read->index == (ngx_uint_t) nevents) {
- c->read->index = ev->index;
- }
-
- if (c->write->index == (ngx_uint_t) nevents) {
- c->write->index = ev->index;
+ if (c->fd == -1) {
+ ngx_log_error(NGX_LOG_ALERT, ev->log, 0,
+ "unexpected last event");
+
+ } else {
+ if (c->read->index == (ngx_uint_t) nevents) {
+ c->read->index = ev->index;
+ }
+
+ if (c->write->index == (ngx_uint_t) nevents) {
+ c->write->index = ev->index;
+ }
}
}
}

View File

@ -72,6 +72,9 @@ patch -p1 < $root/patches/nginx-$main_ver-add_core_vars_polluting_globals.patch
echo applying resolver_debug_log_overflow.patch ... echo applying resolver_debug_log_overflow.patch ...
patch -p1 < $root/patches/nginx-$main_ver-resolver_debug_log_overflow.patch || exit 1 patch -p1 < $root/patches/nginx-$main_ver-resolver_debug_log_overflow.patch || exit 1
echo applying poll_del_event_at_exit.patch ...
patch -p1 < $root/patches/nginx-$main_ver-poll_del_event_at_exit.patch
#echo "INFO: applying null-character-fixes patch" #echo "INFO: applying null-character-fixes patch"
#patch -p0 < $root/patches/nginx-$main_ver-null_character_fixes.patch || exit 1 #patch -p0 < $root/patches/nginx-$main_ver-null_character_fixes.patch || exit 1

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
main_ver=1.0.15 main_ver=1.0.15
minor_ver=7 minor_ver=9rc1
version=$main_ver.$minor_ver version=$main_ver.$minor_ver
echo $version echo $version