Welcome! Log In Create A New Profile

Advanced

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

Anonymous User
August 03, 2012 05:12AM
Author: mdounin
Date: 2012-08-03 09:10:39 +0000 (Fri, 03 Aug 2012)
New Revision: 4783
URL: http://trac.nginx.org/nginx/changeset/4783/nginx

Log:
Fixed possible use of old cached times if runtime went backwards.

If ngx_time_sigsafe_update() updated only ngx_cached_err_log_time, and
then clock was adjusted backwards, the cached_time[slot].sec might
accidentally match current seconds on next ngx_time_update() call,
resulting in various cached times not being updated.

Fix is to clear the cached_time[slot].sec to explicitly mark cached times
are stale and need updating.


Modified:
trunk/src/core/ngx_times.c

Modified: trunk/src/core/ngx_times.c
===================================================================
--- trunk/src/core/ngx_times.c 2012-08-03 09:07:30 UTC (rev 4782)
+++ trunk/src/core/ngx_times.c 2012-08-03 09:10:39 UTC (rev 4783)
@@ -211,6 +211,10 @@
slot++;
}

+ tp = &cached_time[slot];
+
+ tp->sec = 0;
+
ngx_gmtime(sec + cached_gmtoff * 60, &tm);

p = &cached_err_log_time[slot][0];

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

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

Anonymous User 865 August 03, 2012 05:12AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready