changeset 7087:47b7ffc3339d

Fixed calls to ngx_open_file() in certain places. Pass NGX_FILE_OPEN to ngx_open_file() to fix "The parameter is incorrect" error on win32 when using the ssl_session_ticket_key directive or loading a binary geo base. On UNIX, this change is a no-op.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 09 Aug 2017 15:03:27 +0300
parents 577628e6b6a6
children f684178faec9
files src/event/ngx_event_openssl.c src/http/modules/ngx_http_geo_module.c src/stream/ngx_stream_geo_module.c
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -2906,7 +2906,8 @@ ngx_ssl_session_ticket_keys(ngx_conf_t *
         file.name = path[i];
         file.log = cf->log;
 
-        file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 0, 0);
+        file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY,
+                                NGX_FILE_OPEN, 0);
 
         if (file.fd == NGX_INVALID_FILE) {
             ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -1400,7 +1400,7 @@ ngx_http_geo_include_binary_base(ngx_con
     file.name = *name;
     file.log = cf->log;
 
-    file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+    file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
 
     if (file.fd == NGX_INVALID_FILE) {
         err = ngx_errno;
--- a/src/stream/ngx_stream_geo_module.c
+++ b/src/stream/ngx_stream_geo_module.c
@@ -1326,7 +1326,7 @@ ngx_stream_geo_include_binary_base(ngx_c
     file.name = *name;
     file.log = cf->log;
 
-    file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+    file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
 
     if (file.fd == NGX_INVALID_FILE) {
         err = ngx_errno;