[mapserver-commits] r13131 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Feb 9 13:13:33 EST 2012
Author: tbonfort
Date: 2012-02-09 10:13:32 -0800 (Thu, 09 Feb 2012)
New Revision: 13131
Modified:
trunk/mapserver/mapservutil.c
Log:
fix file stat member usage
Modified: trunk/mapserver/mapservutil.c
===================================================================
--- trunk/mapserver/mapservutil.c 2012-02-09 09:43:14 UTC (rev 13130)
+++ trunk/mapserver/mapservutil.c 2012-02-09 18:13:32 UTC (rev 13131)
@@ -177,7 +177,7 @@
int i;
mapObj *map = NULL;
static mapObj *preloadedmap = NULL;
- static struct timespec preloadedmap_mtime;
+ static time_t preloadedmap_mtime;
static char *ms_mapfile = NULL;
struct stat mapfile_stat;
@@ -187,7 +187,7 @@
if(preloadedmap) {
/* we already have a preloaded mapfile, check if the mapfile itself hasn't changed */
stat(ms_mapfile,&mapfile_stat);
- if(mapfile_stat.st_mtimespec.tv_sec > preloadedmap_mtime.tv_sec) {
+ if(mapfile_stat.st_mtime > preloadedmap_mtime) {
/* the mapfile has been updated on disk, discard the cached mapObj */
msFreeMap(preloadedmap);
preloadedmap = NULL;
@@ -199,7 +199,7 @@
preloadedmap = msLoadMap(ms_mapfile,NULL);
if(!preloadedmap) return NULL;
stat(ms_mapfile,&mapfile_stat);
- preloadedmap_mtime = mapfile_stat.st_mtimespec;
+ preloadedmap_mtime = mapfile_stat.st_mtime;
}
map = msNewMapObj();
msCopyMap(map,preloadedmap);
More information about the mapserver-commits
mailing list