Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Mar 5, 2012
1 parent ee943b2 commit 3746952
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
15 changes: 1 addition & 14 deletions apache/mod_mapcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@

module AP_MODULE_DECLARE_DATA mapcache_module;

int is_threaded;

typedef struct mapcache_context_apache mapcache_context_apache;
typedef struct mapcache_context_apache_request mapcache_context_apache_request;
typedef struct mapcache_context_apache_server mapcache_context_apache_server;
Expand Down Expand Up @@ -184,9 +182,6 @@ static mapcache_context_apache_request* apache_request_context_create(request_re
config = apr_hash_get(cfg->aliases,(void*)r->filename,APR_HASH_KEY_STRING);
ctx->ctx.ctx.config = config;
ctx->request = r;
if(is_threaded) {
ctx->ctx.ctx.has_threads = 1;
}
init_apache_request_context(ctx);
return ctx;
}
Expand Down Expand Up @@ -315,10 +310,6 @@ static int mod_mapcache_request_handler(request_rec *r) {

static int mod_mapcache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) {
mapcache_server_cfg* cfg = ap_get_module_config(s->module_config, &mapcache_module);
server_rec *sconf;
apr_status_t rv;
mapcache_context *ctx = (mapcache_context*)apache_server_context_create(s,p);

if(!cfg) {
ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, "configuration not found in server context");
return 1;
Expand All @@ -328,10 +319,7 @@ static int mod_mapcache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t
ap_add_version_component(p, MAPCACHE_USERAGENT);
#endif

rv = ap_mpm_query(AP_MPMQ_IS_THREADED,&is_threaded);
}

static void mod_mapcache_child_init(apr_pool_t *pool, server_rec *s) {
return 0;
}

static int mapcache_alias_matches(const char *uri, const char *alias_fakename)
Expand Down Expand Up @@ -413,7 +401,6 @@ static void mod_mapcache_register_hooks(apr_pool_t *p) {
static const char * const p1[] = { "mod_alias.c", "mod_rewrite.c", NULL };
static const char * const n1[]= { "mod_userdir.c",
"mod_vhost_alias.c", NULL };
ap_hook_child_init(mod_mapcache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(mod_mapcache_post_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_handler(mod_mapcache_request_handler, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_translate_name(mapcache_hook_intercept, p1, n1, APR_HOOK_MIDDLE);
Expand Down
1 change: 0 additions & 1 deletion include/mapcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ struct mapcache_context {

const char* (*get_instance_id)(mapcache_context * ctx);
mapcache_context* (*clone)(mapcache_context *ctx);
int has_threads;
apr_pool_t *pool;
char *_contenttype;
char *_errmsg;
Expand Down
1 change: 0 additions & 1 deletion lib/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ void mapcache_context_copy(mapcache_context *src, mapcache_context *dst) {
dst->pool = src->pool;
dst->set_exception = src->set_exception;
dst->service = src->service;
dst->has_threads = src->has_threads;
dst->exceptions = src->exceptions;
}

Expand Down
1 change: 0 additions & 1 deletion util/mapcache_seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ int main(int argc, const char **argv) {
cfg = mapcache_configuration_create(ctx.pool);
ctx.config = cfg;
ctx.log= mapcache_context_seeding_log;
ctx.has_threads = 1;
apr_getopt_init(&opt, ctx.pool, argc, argv);

seededtiles=seededtilestot=queuedtilestot=0;
Expand Down

0 comments on commit 3746952

Please sign in to comment.