You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/05/03 19:07:10 UTC
DO NOT REPLY [Bug 51146] New: mtime without fractional seconds when
HAVE_STRUCT_STAT_ST_MTIME_N apr/file_io/unix/filestat.c
https://issues.apache.org/bugzilla/show_bug.cgi?id=51146
Bug #: 51146
Summary: mtime without fractional seconds when
HAVE_STRUCT_STAT_ST_MTIME_N
apr/file_io/unix/filestat.c
Product: Apache httpd-2
Version: 2.2.17
Platform: Other
OS/Version: other
Status: NEW
Severity: minor
Priority: P2
Component: Platform
AssignedTo: bugs@httpd.apache.org
ReportedBy: rainer-apache@7val.com
Classification: Unclassified
I believe that the fractional part of the file mtime would be thrown away if
HAVE_STRUCT_STAT_ST_MTIME_N in fill_out_finfo(), as it is erroneously added to
finfo->ctime, which is initialized in the following line. I have no idea for
which platform/OS this might be true.
apr_time_ansi_put(&finfo->mtime, info->st_mtime);
#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
finfo->mtime += info->st_mtim.tv_nsec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
#endif
apr_time_ansi_put(&finfo->ctime, info->st_ctime);
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 51146] mtime without fractional seconds when
HAVE_STRUCT_STAT_ST_MTIME_N apr/file_io/unix/filestat.c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51146
Ruediger Pluem <rp...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Platform |APR
Version|2.2.17 |HEAD
Product|Apache httpd-2 |APR
--- Comment #1 from Ruediger Pluem <rp...@apache.org> 2011-05-04 06:05:21 UTC ---
Indeed this looks like a bug.
The following patch should fix this.
Index: file_io/unix/filestat.c
===================================================================
--- file_io/unix/filestat.c (Revision 1098497)
+++ file_io/unix/filestat.c (Arbeitskopie)
@@ -95,7 +95,7 @@
#elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
finfo->atime += info->st_atimensec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_ATIME_N)
- finfo->ctime += info->st_atime_n / APR_TIME_C(1000);
+ finfo->atime += info->st_atime_n / APR_TIME_C(1000);
#endif
apr_time_ansi_put(&finfo->mtime, info->st_mtime);
@@ -104,7 +104,7 @@
#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
- finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
+ finfo->mtime += info->st_mtime_n / APR_TIME_C(1000);
#endif
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 51146] mtime without fractional seconds when
HAVE_STRUCT_STAT_ST_MTIME_N apr/file_io/unix/filestat.c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51146
--- Comment #2 from Ruediger Pluem <rp...@apache.org> 2011-05-04 07:17:47 UTC ---
Fixed in r1099348 in trunk.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org