comparison src/http/modules/ngx_http_mp4_module.c @ 4087:3aa3b7bb9f0d

Bugfix of r4086: directio was always enabled if mp4 file was sent as is.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 09 Sep 2011 11:13:55 +0000
parents 6492c79e943a
children 8fe1da7b8386
comparison
equal deleted inserted replaced
4086:dceb4f509661 4087:3aa3b7bb9f0d
408 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 408 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
409 409
410 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); 410 ngx_memzero(&of, sizeof(ngx_open_file_info_t));
411 411
412 of.read_ahead = clcf->read_ahead; 412 of.read_ahead = clcf->read_ahead;
413 of.directio = NGX_MAX_OFF_T_VALUE;
413 of.valid = clcf->open_file_cache_valid; 414 of.valid = clcf->open_file_cache_valid;
414 of.min_uses = clcf->open_file_cache_min_uses; 415 of.min_uses = clcf->open_file_cache_min_uses;
415 of.errors = clcf->open_file_cache_errors; 416 of.errors = clcf->open_file_cache_errors;
416 of.events = clcf->open_file_cache_events; 417 of.events = clcf->open_file_cache_events;
417 418
531 532
532 if (ngx_directio_on(of.fd) == NGX_FILE_ERROR) { 533 if (ngx_directio_on(of.fd) == NGX_FILE_ERROR) {
533 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 534 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
534 ngx_directio_on_n " \"%s\" failed", path.data); 535 ngx_directio_on_n " \"%s\" failed", path.data);
535 } 536 }
537
538 of.is_directio = 1;
536 539
537 if (mp4) { 540 if (mp4) {
538 mp4->file.directio = 1; 541 mp4->file.directio = 1;
539 } 542 }
540 } 543 }