[mapserver-commits] r12426 - in trunk/mapserver/mapcache: . src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:24:45 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:24:45 -0700 (Fri, 26 Aug 2011)
New Revision: 12426
Modified:
trunk/mapserver/mapcache/geocache.xml
trunk/mapserver/mapcache/src/image.c
trunk/mapserver/mapcache/src/lock.c
trunk/mapserver/mapcache/src/mod_geocache.c
Log:
fix mbtiles metadata table schema
thomas.bonfort | 2011-08-13 19:43:12 +0200 (Sat, 13 Aug 2011)
Modified: trunk/mapserver/mapcache/geocache.xml
===================================================================
--- trunk/mapserver/mapcache/geocache.xml 2011-08-26 11:24:39 UTC (rev 12425)
+++ trunk/mapserver/mapcache/geocache.xml 2011-08-26 11:24:45 UTC (rev 12426)
@@ -662,8 +662,8 @@
<grid>MILLER</grid>
<grid>WGS84</grid>
<grid>g</grid>
- <metatile>10 10</metatile>
- <expires>1</expires>
+ <metatile>5 5</metatile>
+ <expires>10000</expires>
<metabuffer>10</metabuffer>
</tileset>
Modified: trunk/mapserver/mapcache/src/image.c
===================================================================
--- trunk/mapserver/mapcache/src/image.c 2011-08-26 11:24:39 UTC (rev 12425)
+++ trunk/mapserver/mapcache/src/image.c 2011-08-26 11:24:45 UTC (rev 12426)
@@ -93,7 +93,7 @@
if(!overlay) return NULL;
if(tile->mtime < tiles[i]->mtime)
tile->mtime = tiles[i]->mtime;
- if(tiles[i]->expires && ((tile->expires < tiles[i]->expires) || !tile->expires)) {
+ if(tiles[i]->expires < tile->expires) {
tile->expires = tiles[i]->expires;
}
geocache_image_merge(ctx, base, overlay);
Modified: trunk/mapserver/mapcache/src/lock.c
===================================================================
--- trunk/mapserver/mapcache/src/lock.c 2011-08-26 11:24:39 UTC (rev 12425)
+++ trunk/mapserver/mapcache/src/lock.c 2011-08-26 11:24:45 UTC (rev 12426)
@@ -273,6 +273,7 @@
ctx->set_error(ctx,500, "lock_exists: failed to close lockfile %s: %s",
lockname, apr_strerror(rv,errmsg,120));
}
+ //TODO: remove the file as we will fail later if not
return GEOCACHE_FALSE;
}
#endif
Modified: trunk/mapserver/mapcache/src/mod_geocache.c
===================================================================
--- trunk/mapserver/mapcache/src/mod_geocache.c 2011-08-26 11:24:39 UTC (rev 12425)
+++ trunk/mapserver/mapcache/src/mod_geocache.c 2011-08-26 11:24:45 UTC (rev 12426)
@@ -199,10 +199,6 @@
int rc;
request_rec *r = ctx->request;
- ap_update_mtime(r, tile->mtime);
- if((rc = ap_meets_conditions(r)) != OK) {
- return rc;
- }
if(tile->expires) {
apr_time_t now = apr_time_now();
apr_time_t additional = apr_time_from_sec(tile->expires);
@@ -213,6 +209,10 @@
apr_table_set(r->headers_out, "Expires", timestr);
}
ap_set_last_modified(r);
+ ap_update_mtime(r, tile->mtime);
+ if((rc = ap_meets_conditions(r)) != OK) {
+ return rc;
+ }
return geocache_write_image_buffer(ctx, tile->data, tile->tileset->format);
}
More information about the mapserver-commits
mailing list