comparison src/event/modules/ngx_select_module.c @ 469:2ff194b74f1e release-0.1.9

nginx-0.1.9-RELEASE import *) Bugfix: the proxied request was sent without arguments if the request contains "//", "/./", "/../" or "%XX". *) Bugfix: the large compressed responses may be transferred not completely. *) Bugfix: the files bigger than 2G was not transferred on Linux that does not support sendfile64(). *) Bugfix: while the build configuration on Linux the --with-poll_module parameter was required; the bug had appeared in 0.1.8.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 25 Nov 2004 16:17:31 +0000
parents a88a3e4e158f
children 31ff3e943e16
comparison
equal deleted inserted replaced
468:1a67596d0349 469:2ff194b74f1e
256 ngx_msec_t timer; 256 ngx_msec_t timer;
257 ngx_event_t *ev; 257 ngx_event_t *ev;
258 ngx_connection_t *c; 258 ngx_connection_t *c;
259 ngx_epoch_msec_t delta; 259 ngx_epoch_msec_t delta;
260 struct timeval tv, *tp; 260 struct timeval tv, *tp;
261 #if (HAVE_SELECT_CHANGE_TIMEOUT) 261 #if (NGX_HAVE_SELECT_CHANGE_TIMEOUT)
262 static ngx_epoch_msec_t deltas = 0; 262 static ngx_epoch_msec_t deltas = 0;
263 #endif 263 #endif
264 264
265 for ( ;; ) { 265 for ( ;; ) {
266 timer = ngx_event_find_timer(); 266 timer = ngx_event_find_timer();
360 err = ngx_socket_errno; 360 err = ngx_socket_errno;
361 } else { 361 } else {
362 err = 0; 362 err = 0;
363 } 363 }
364 364
365 #if (HAVE_SELECT_CHANGE_TIMEOUT) 365 #if (NGX_HAVE_SELECT_CHANGE_TIMEOUT)
366 366
367 if (timer != NGX_TIMER_INFINITE) { 367 if (timer != NGX_TIMER_INFINITE) {
368 delta = timer - (tv.tv_sec * 1000 + tv.tv_usec / 1000); 368 delta = timer - (tv.tv_sec * 1000 + tv.tv_usec / 1000);
369 369
370 /* 370 /*
401 ngx_accept_mutex_unlock(); 401 ngx_accept_mutex_unlock();
402 return NGX_ERROR; 402 return NGX_ERROR;
403 } 403 }
404 } 404 }
405 405
406 #else /* !(HAVE_SELECT_CHANGE_TIMEOUT) */ 406 #else /* !(NGX_HAVE_SELECT_CHANGE_TIMEOUT) */
407 407
408 ngx_gettimeofday(&tv); 408 ngx_gettimeofday(&tv);
409 ngx_time_update(tv.tv_sec); 409 ngx_time_update(tv.tv_sec);
410 410
411 delta = ngx_elapsed_msec; 411 delta = ngx_elapsed_msec;
425 ngx_accept_mutex_unlock(); 425 ngx_accept_mutex_unlock();
426 return NGX_ERROR; 426 return NGX_ERROR;
427 } 427 }
428 } 428 }
429 429
430 #endif /* HAVE_SELECT_CHANGE_TIMEOUT */ 430 #endif /* NGX_HAVE_SELECT_CHANGE_TIMEOUT */
431 431
432 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 432 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
433 "select ready %d", ready); 433 "select ready %d", ready);
434 434
435 if (err) { 435 if (err) {