[mapserver-commits] r12185 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:05:16 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:05:16 -0700 (Fri, 26 Aug 2011)
New Revision: 12185
Modified:
trunk/mapserver/mapcache/src/cache_disk.c
Log:
remove debugging logs
thomas.bonfort | 2010-12-21 17:20:14 +0100 (Tue, 21 Dec 2010)
Modified: trunk/mapserver/mapcache/src/cache_disk.c
===================================================================
--- trunk/mapserver/mapcache/src/cache_disk.c 2011-08-26 11:05:10 UTC (rev 12184)
+++ trunk/mapserver/mapcache/src/cache_disk.c 2011-08-26 11:05:16 UTC (rev 12185)
@@ -183,6 +183,8 @@
char *blankname;
_geocache_cache_disk_blank_tile_key(ctx,tile,image->data,&blankname);
GC_CHECK_ERROR(ctx);
+ ctx->global_lock_aquire(ctx, 0);
+ GC_CHECK_ERROR(ctx);
if(apr_file_open(&f, blankname, APR_FOPEN_READ, APR_OS_DEFAULT, ctx->pool) != APR_SUCCESS) {
/* create the blank file */
if(APR_SUCCESS != apr_dir_make_recursive(
@@ -190,12 +192,14 @@
((geocache_cache_disk*)tile->tileset->cache)->base_directory,tile->tileset->name),
APR_OS_DEFAULT,ctx->pool)) {
ctx->set_error(ctx, GEOCACHE_DISK_ERROR, "failed to create directory for blank tiles");
+ ctx->global_lock_release(ctx);
return;
}
if(apr_file_open(&f, blankname,
APR_FOPEN_CREATE|APR_FOPEN_WRITE|APR_FOPEN_BUFFERED|APR_FOPEN_BINARY,
APR_OS_DEFAULT, ctx->pool) != APR_SUCCESS) {
ctx->set_error(ctx, GEOCACHE_DISK_ERROR, "failed to create file %s",blankname);
+ ctx->global_lock_release(ctx);
return; /* we could not create the file */
}
@@ -204,6 +208,7 @@
if(bytes != tile->data->size) {
ctx->set_error(ctx, GEOCACHE_DISK_ERROR, "failed to write image data to disk, wrote %d of %d bytes",(int)bytes, (int)tile->data->size);
+ ctx->global_lock_release(ctx);
return;
}
apr_file_close(f);
@@ -211,6 +216,7 @@
ctx->log(ctx,GEOCACHE_DEBUG,"created blank tile %s",blankname);
#endif
}
+ ctx->global_lock_release(ctx);
if(apr_file_link(blankname,filename) != GEOCACHE_SUCCESS) {
ctx->set_error(ctx, GEOCACHE_DISK_ERROR, "failed to link tile %s to %s",filename, blankname);
return; /* we could not create the file */
More information about the mapserver-commits
mailing list