Exemplo n.º 1
0
static mapcache_context_apache_request* apache_request_context_create(request_rec *r) {
   mapcache_context_apache_request *ctx = apr_pcalloc(r->pool, sizeof(mapcache_context_apache_request));
   ctx->ctx.ctx.pool = r->pool;
   /* lookup the configuration object given the configuration file name */
   mapcache_server_cfg* cfg = ap_get_module_config(r->server->module_config, &mapcache_module);
   mapcache_cfg *config = apr_hash_get(cfg->aliases,(void*)r->filename,APR_HASH_KEY_STRING);
   ctx->ctx.ctx.config = config;
   ctx->request = r;
   init_apache_request_context(ctx);
   return ctx;
}
Exemplo n.º 2
0
static mapcache_context_apache_request* apache_request_context_create(request_rec *r)
{
  mapcache_context_apache_request *ctx = apr_pcalloc(r->pool, sizeof(mapcache_context_apache_request));
  mapcache_server_cfg *cfg = NULL;
  mapcache_cfg *config = NULL;

  ctx->ctx.ctx.pool = r->pool;
  ctx->ctx.ctx.process_pool = pchild;
#ifdef APR_HAS_THREADS
  ctx->ctx.ctx.threadlock = thread_mutex;
#endif

  /* lookup the configuration object given the configuration file name */
  cfg = ap_get_module_config(r->server->module_config, &mapcache_module);
  config = apr_hash_get(cfg->aliases,(void*)r->filename,APR_HASH_KEY_STRING);
  ctx->ctx.ctx.config = config;
  ctx->request = r;
  init_apache_request_context(ctx);
  return ctx;
}