diff src/core/ngx_times.c @ 280:fa73fb2d9427 NGINX_0_5_10

nginx 0.5.10 *) Bugfix: while online executable file upgrade the new master process did not inherit the listening sockets; bug appeared in 0.5.9. *) Bugfix: a segmentation fault might occur in worker process if nginx was built with -O2 optimization; bug appeared in 0.5.1.
author Igor Sysoev <http://sysoev.ru>
date Fri, 26 Jan 2007 00:00:00 +0300
parents 6eb1e38f0f1f
children 675a39fd14cd
line wrap: on
line diff
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -101,7 +101,7 @@ ngx_time_update(time_t sec, ngx_uint_t m
     ngx_gmtime(sec, &gmt);
 
 
-    p0 = cached_http_time[slot];
+    p0 = &cached_http_time[slot][0];
 
     (void) ngx_sprintf(p0, "%s, %02d %s %4d %02d:%02d:%02d GMT",
                        week[gmt.ngx_tm_wday], gmt.ngx_tm_mday,
@@ -126,7 +126,7 @@ ngx_time_update(time_t sec, ngx_uint_t m
 #endif
 
 
-    p1 = cached_err_log_time[slot];
+    p1 = &cached_err_log_time[slot][0];
 
     (void) ngx_sprintf(p1, "%4d/%02d/%02d %02d:%02d:%02d",
                        tm.ngx_tm_year, tm.ngx_tm_mon,
@@ -134,7 +134,7 @@ ngx_time_update(time_t sec, ngx_uint_t m
                        tm.ngx_tm_min, tm.ngx_tm_sec);
 
 
-    p2 = cached_http_log_time[slot];
+    p2 = &cached_http_log_time[slot][0];
 
     (void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d",
                        tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],