Skip to content

Commit

Permalink
create thread mutex even on prefork mpm (MapServer#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed May 13, 2013
1 parent 826e5e5 commit 7a5d877
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions apache/mod_mapcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <http_request.h>
#include <apr_strings.h>
#include <apr_time.h>
#include <ap_mpm.h>
#include <http_log.h>
#include "mapcache.h"
#ifdef APR_HAS_THREADS
Expand Down Expand Up @@ -252,13 +251,9 @@ static int write_http_response(mapcache_context_apache_request *ctx, mapcache_ht

static void mod_mapcache_child_init(apr_pool_t *pool, server_rec *s)
{
int threaded;
pchild = pool;
#ifdef APR_HAS_THREADS
ap_mpm_query(AP_MPMQ_IS_THREADED,&threaded);
if(threaded) {
apr_thread_mutex_create(&thread_mutex,APR_THREAD_MUTEX_DEFAULT,pool);
}
apr_thread_mutex_create(&thread_mutex,APR_THREAD_MUTEX_DEFAULT,pool);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion lib/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ mapcache_http_response* mapcache_core_respond_to_error(mapcache_context *ctx)

msg = ctx->_errmsg;
if(!msg) {
msg = "an unspecified error has occured";
msg = apr_pstrdup(ctx->pool,"an unspecified error has occured");
}
ctx->log(ctx,MAPCACHE_ERROR,msg);

Expand Down

0 comments on commit 7a5d877

Please sign in to comment.