Skip to content
Permalink
Browse files

Removed my debugging calls.

  • Loading branch information...
sdlime committed Apr 6, 2017
1 parent 761022e commit 23891f2c5f87ee2c5111ef485fbbc0edf9f0a807
Showing with 0 additions and 41 deletions.
  1. +0 −7 lib/cache_disk.c
  2. +0 −7 lib/core.c
  3. +0 −2 lib/image.c
  4. +0 −2 lib/source.c
  5. +0 −4 lib/source_wms.c
  6. +0 −19 lib/tileset.c
@@ -492,8 +492,6 @@ static void _mapcache_cache_disk_set(mapcache_context *ctx, mapcache_cache *pcac
const int creation_retry = cache->creation_retry;
int retry_count_create_file = 0;

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_cache_disk_set(): format=%d...", tile->tileset->format->type);

#ifdef DEBUG
/* all this should be checked at a higher level */
if(!tile->encoded_data && !tile->raw_image) {
@@ -517,9 +515,6 @@ static void _mapcache_cache_disk_set(mapcache_context *ctx, mapcache_cache *pcac
ctx->set_error(ctx, 500, "failed to remove file %s: %s",filename, apr_strerror(ret,errmsg,120));
}

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: filename=%s...", filename);
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: tile size=%d bytes...", tile->encoded_data->size);

#ifdef HAVE_SYMLINK
if(cache->symlink_blank) {
if(tile->tileset->format->type != GC_BLOB && !tile->raw_image) {
@@ -611,8 +606,6 @@ static void _mapcache_cache_disk_set(mapcache_context *ctx, mapcache_cache *pcac

/* go the normal way: either we haven't configured blank tile detection, or the tile was not blank */

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: normal way");

if(!tile->encoded_data) {
tile->encoded_data = tile->tileset->format->write(ctx, tile->raw_image, tile->tileset->format);
GC_CHECK_ERROR(ctx);
@@ -83,7 +83,6 @@ void mapcache_prefetch_tiles(mapcache_context *ctx, mapcache_tile **tiles, int n
#if !APR_HAS_THREADS
int i;
for(i=0; i<ntiles; i++) {
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: calling mapcache_tileset_tile_get(1)...");
mapcache_tileset_tile_get(ctx, tiles[i]);
GC_CHECK_ERROR(ctx);
}
@@ -93,7 +92,6 @@ void mapcache_prefetch_tiles(mapcache_context *ctx, mapcache_tile **tiles, int n
if(ntiles==1 || ctx->config->threaded_fetching == 0) {
/* if threads disabled, or only fetching a single tile, don't launch a thread for the operation */
for(i=0; i<ntiles; i++) {
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: calling mapcache_tileset_tile_get(2)...");
mapcache_tileset_tile_get(ctx, tiles[i]);
GC_CHECK_ERROR(ctx);
}
@@ -159,7 +157,6 @@ void mapcache_prefetch_tiles(mapcache_context *ctx, mapcache_tile **tiles, int n
for(i=0; i<ntiles; i++) {
/* fetch the tiles that did not get a thread launched for them */
if(thread_tiles[i].launch) continue;
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: calling mapcache_tileset_tile_get(3)...");
mapcache_tileset_tile_get(ctx, tiles[i]);
GC_CHECK_ERROR(ctx);
}
@@ -206,7 +203,6 @@ mapcache_http_response *mapcache_core_get_tile(mapcache_context *ctx, mapcache_r
format = NULL;

#ifdef DEBUG
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: In mapcache_core_get_tile(), ntiles=%d...", req_tile->ntiles);
if(req_tile->ntiles == 0) {
ctx->set_error(ctx,500,"BUG: get_tile called with 0 tiles");
return NULL;
@@ -273,15 +269,13 @@ mapcache_http_response *mapcache_core_get_tile(mapcache_context *ctx, mapcache_r
/* we have an existing tile, so we know we need to merge the current one into it */
if(!base) {
/* the existing tile has not been decoded yet, but we need the access to the raw pixels*/
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: mapcache_imageio_decode(1)...");
base = mapcache_imageio_decode(ctx, response->data);
if(!base) return NULL;
}
response->data = NULL; /* the encoded data is now obsolete, as we will be merging the current tile */

/* we need to access the current tile's pixel data */
if(!tile->raw_image) {
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: mapcache_imageio_decode(2)...");
tile->raw_image = mapcache_imageio_decode(ctx,tile->encoded_data);
if(!tile->raw_image) return NULL;
}
@@ -437,7 +431,6 @@ mapcache_http_response *mapcache_core_get_map(mapcache_context *ctx, mapcache_re
char *timestr;

#ifdef DEBUG
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: In mapcache_core_get_map()...");
if(req_map->nmaps ==0) {
ctx->set_error(ctx,500,"BUG: get_map called with 0 maps");
return NULL;
@@ -280,7 +280,6 @@ void mapcache_image_copy_resampled_bilinear(mapcache_context *ctx, mapcache_imag

void mapcache_image_metatile_split(mapcache_context *ctx, mapcache_metatile *mt)
{
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_image_metatile_split(): format=%d", mt->map.tileset->format->type);

if(mt->map.tileset->format) {
/* the tileset has a format defined, we will use it to encode the data */
@@ -293,7 +292,6 @@ void mapcache_image_metatile_split(mapcache_context *ctx, mapcache_metatile *mt)
** No metatile support for blobs...
*/
if(mt->map.tileset->format->type == GC_BLOB) {
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: got a blob");
mt->tiles[0].encoded_data = mt->map.encoded_data;
return;
}
@@ -63,8 +63,6 @@ void mapcache_source_render_map(mapcache_context *ctx, mapcache_source *source,
if(!GC_HAS_ERROR(ctx))
break;
}

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: done mapcache_source_render_map()...");
}
/* vim: ts=2 sts=2 et sw=2
*/
@@ -57,8 +57,6 @@ void _mapcache_source_wms_render_map(mapcache_context *ctx, mapcache_map *map)
mapcache_http *http;
apr_table_t *params = apr_table_clone(ctx->pool,wms->wms_default_params);

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: finally in _mapcache_source_wms_render_map()...");

apr_table_setn(params,"BBOX",apr_psprintf(ctx->pool,"%f,%f,%f,%f",
map->extent.minx,map->extent.miny,map->extent.maxx,map->extent.maxy));
apr_table_setn(params,"WIDTH",apr_psprintf(ctx->pool,"%d",map->width));
@@ -100,8 +98,6 @@ void _mapcache_source_wms_render_map(mapcache_context *ctx, mapcache_map *map)
ctx->set_error(ctx, 502, "wms request for tileset %s returned an unsupported format:\n%s",
map->tileset->name, returned_data);
}

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: done _mapcache_source_wms_render_map()...");
}

void _mapcache_source_wms_query(mapcache_context *ctx, mapcache_feature_info *fi)
@@ -371,8 +371,6 @@ mapcache_metatile* mapcache_tileset_metatile_get(mapcache_context *ctx, mapcache
double res = grid->levels[tile->z]->resolution;
double gbuffer,gwidth,gheight,fullgwidth,fullgheight;

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_tileset_metatile_get()...");

mt->map.tileset = tileset;
mt->map.grid_link = tile->grid_link;
mt->z = tile->z;
@@ -460,17 +458,12 @@ void mapcache_tileset_render_metatile(mapcache_context *ctx, mapcache_metatile *
{
mapcache_tileset *tileset = mt->map.tileset;

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: mapcache_tileset_render_metatile()");

if(!tileset->source || tileset->read_only) {
ctx->set_error(ctx,500,"tileset_render_metatile called on tileset with no source or that is read-only");
return;
}
mapcache_source_render_map(ctx, tileset->source, &mt->map);
GC_CHECK_ERROR(ctx);

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: passed mapcache_source_render_map()");

mapcache_image_metatile_split(ctx, mt);
GC_CHECK_ERROR(ctx);
mapcache_cache_tile_multi_set(ctx, tileset->_cache, mt->tiles, mt->ntiles);
@@ -945,8 +938,6 @@ void mapcache_tileset_tile_set_get_with_subdimensions(mapcache_context *ctx, map
void mapcache_tileset_tile_get_with_subdimensions(mapcache_context *ctx, mapcache_tile *tile) {
int i,ret;

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_tileset_tile_get_with_subdimensions()...");

assert(tile->dimensions);
if(tile->tileset->store_dimension_assemblies) {
for(i=0;i<tile->dimensions->nelts;i++) {
@@ -1000,8 +991,6 @@ static void mapcache_tileset_tile_get_without_subdimensions(mapcache_context *ct
ret = mapcache_cache_tile_get(ctx, tile->tileset->_cache, tile);
GC_CHECK_ERROR(ctx);

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_tileset_tile_get_without_subdimensions() - ret=%d...", ret);

if(ret == MAPCACHE_SUCCESS && tile->tileset->auto_expire && tile->mtime && tile->tileset->source && !tile->tileset->read_only) {
/* the cache is in auto-expire mode, and can return the tile modification date,
* and there is a source configured so we can possibly update it,
@@ -1037,8 +1026,6 @@ static void mapcache_tileset_tile_get_without_subdimensions(mapcache_context *ct
int isLocked = MAPCACHE_FALSE;
void *lock;

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: MAPCACHE_CACHE_MISS...");

/* If the tile does not exist or stale, we must take action before re-asking for it */
if( !read_only && !ctx->config->non_blocking) {
/*
@@ -1053,10 +1040,6 @@ static void mapcache_tileset_tile_get_without_subdimensions(mapcache_context *ct
mt = mapcache_tileset_metatile_get(ctx, tile);
isLocked = mapcache_lock_or_wait_for_resource(ctx, ctx->config->locker, mapcache_tileset_metatile_resource_key(ctx,mt), &lock);
GC_CHECK_ERROR(ctx);

ctx->log(ctx, MAPCACHE_DEBUG, "SDL: metatile get succeeded - just sets parameters");
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: mt->metasize_x=%d, mt->metasize_y=%d", mt->metasize_x, mt->metasize_y);

if(isLocked == MAPCACHE_TRUE) {
/* no other thread is doing the rendering, do it ourselves */
#ifdef DEBUG
@@ -1111,8 +1094,6 @@ static void mapcache_tileset_tile_get_without_subdimensions(mapcache_context *ct
}

void mapcache_tileset_tile_get(mapcache_context *ctx, mapcache_tile *tile) {
ctx->log(ctx, MAPCACHE_DEBUG, "SDL: in mapcache_tileset_tile_get()...");

if(tile->grid_link->outofzoom_strategy != MAPCACHE_OUTOFZOOM_NOTCONFIGURED &&
tile->z > tile->grid_link->max_cached_zoom) {
mapcache_tileset_outofzoom_get(ctx, tile);

0 comments on commit 23891f2

Please sign in to comment.
You can’t perform that action at this time.