[mapserver-commits] r12176 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:04:32 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:04:32 -0700 (Fri, 26 Aug 2011)
New Revision: 12176

Modified:
   trunk/mapserver/mapcache/src/mod_geocache.c
Log:
add stub for GDAL source
thomas.bonfort | 2010-12-13 17:13:59 +0100 (Mon, 13 Dec 2010)

Modified: trunk/mapserver/mapcache/src/mod_geocache.c
===================================================================
--- trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:04:29 UTC (rev 12175)
+++ trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:04:32 UTC (rev 12176)
@@ -81,12 +81,10 @@
 
 void apache_context_request_log(geocache_context *c, geocache_log_level level, char *message, ...) {
    geocache_context_apache_request *ctx = (geocache_context_apache_request*)c;
-   c->global_lock_aquire(c,0);
    va_list args;
    va_start(args,message);
    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, ctx->request,"%s",apr_pvsprintf(ctx->ctx.ctx.pool,message,args));
    va_end(args);
-   c->global_lock_release(c);
 }
 
 void geocache_util_mutex_aquire(geocache_context *gctx, int nonblocking) {
@@ -244,13 +242,17 @@
 static int mod_geocache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) {
    apr_status_t rc;
    geocache_server_cfg* cfg = ap_get_module_config(s->module_config, &geocache_module);
+   apr_lockmech_e lock_type = APR_LOCK_DEFAULT;
 #ifdef DEBUG
    if(!cfg) {
       ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, "configuration not found in server context");
       return 1;
    }
 #endif
-   rc = apr_global_mutex_create(&cfg->mutex,geocache_mutex_name,APR_LOCK_DEFAULT,p);
+#ifdef APR_HAS_PROC_PTHREAD_SERIALIZE
+   lock_type = APR_LOCK_PROC_PTHREAD;
+#endif
+   rc = apr_global_mutex_create(&cfg->mutex,geocache_mutex_name,lock_type,p);
    if(rc != APR_SUCCESS) {
       ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s, "Could not create global parent mutex %s", geocache_mutex_name);
       return rc;



More information about the mapserver-commits mailing list