[mapserver-commits] r13164 - sandbox/tb-labels/mapcache/cgi

svn at osgeo.org svn at osgeo.org
Wed Feb 22 12:25:14 EST 2012


Author: tbonfort
Date: 2012-02-22 09:25:14 -0800 (Wed, 22 Feb 2012)
New Revision: 13164

Modified:
   sandbox/tb-labels/mapcache/cgi/mapcache.c
Log:
fix corner case with missing pool  when first loading an inexistant
or unaccessible config file in cgi/fastcgi mode (#4209)


Modified: sandbox/tb-labels/mapcache/cgi/mapcache.c
===================================================================
--- sandbox/tb-labels/mapcache/cgi/mapcache.c	2012-02-22 13:44:44 UTC (rev 13163)
+++ sandbox/tb-labels/mapcache/cgi/mapcache.c	2012-02-22 17:25:14 UTC (rev 13164)
@@ -157,6 +157,7 @@
       apr_file_info_get(&finfo, APR_FINFO_MTIME, f);
       apr_file_close(f);
    } else {
+      if(!ctx->pool) ctx->pool = global_pool;
       ctx->set_error(ctx,500,"failed to open config file %s",filename);
       return;
    }
@@ -220,7 +221,6 @@
 #endif
    apr_initialize();
    atexit(apr_terminate);
-   apr_pool_initialize();
    if(apr_pool_create(&global_pool,NULL) != APR_SUCCESS) {
       return 1;
    }



More information about the mapserver-commits mailing list