[nginx] svn commit: r4485 - trunk/src/core

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Feb 20 19:14:09 UTC 2012


Author: mdounin
Date: 2012-02-20 19:14:07 +0000 (Mon, 20 Feb 2012)
New Revision: 4485

Log:
Disable symlinks: error handling cleanup again.


Modified:
   trunk/src/core/ngx_open_file_cache.c

Modified: trunk/src/core/ngx_open_file_cache.c
===================================================================
--- trunk/src/core/ngx_open_file_cache.c	2012-02-20 19:12:48 UTC (rev 4484)
+++ trunk/src/core/ngx_open_file_cache.c	2012-02-20 19:14:07 UTC (rev 4485)
@@ -590,10 +590,10 @@
                                 NGX_FILE_RDONLY|NGX_FILE_NONBLOCK,
                                 NGX_FILE_OPEN, 0);
 
-        if (at_fd == NGX_FILE_ERROR) {
+        if (at_fd == NGX_INVALID_FILE) {
             of->err = ngx_errno;
             of->failed = ngx_openat_file_n;
-            return NGX_FILE_ERROR;
+            return NGX_INVALID_FILE;
         }
 
         at_name.len = 1;
@@ -634,7 +634,7 @@
 
         if (at_fd != AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) {
             ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
-                          ngx_close_file_n " \"%V\" failed", at_name);
+                          ngx_close_file_n " \"%V\" failed", &at_name);
         }
 
         p = cp + 1;
@@ -692,7 +692,7 @@
 
     if (at_fd != AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) {
         ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
-                      ngx_close_file_n " \"%V\" failed", at_name);
+                      ngx_close_file_n " \"%V\" failed", &at_name);
     }
 
     return fd;



More information about the nginx-devel mailing list