Skip to content

Commit

Permalink
Fixed Windows crash in mapcache apache module
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Boudreault committed Jan 17, 2012
1 parent fdbc2e5 commit 0c1a711
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apache/mod_mapcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ void apache_context_server_log(mapcache_context *c, mapcache_log_level level, ch
ap_log_error(APLOG_MARK, ap_log_level, 0, ctx->server,"%s",msg);
}

void apache_context_request_log(mapcache_context *c, mapcache_log_level level, char *message, ...) {
void apache_context_request_log(mapcache_context *c, mapcache_log_level level, char *message, ...) {
mapcache_context_apache_request *ctx = (mapcache_context_apache_request*)c;
va_list args;
char *res;
int ap_log_level;
va_start(args,message);
res = apr_pvsprintf(c->pool, message, args);
va_end(args);
switch(level) {
case MAPCACHE_DEBUG:
Expand Down Expand Up @@ -145,7 +147,7 @@ void apache_context_request_log(mapcache_context *c, mapcache_log_level level, c
default:
ap_log_level = APLOG_WARNING;
}
ap_log_rerror(APLOG_MARK, ap_log_level, 0, ctx->request, "%s", apr_pvsprintf(c->pool,message,args));
ap_log_rerror(APLOG_MARK, ap_log_level, 0, ctx->request, "%s", res);
}

mapcache_context *mapcache_context_request_clone(mapcache_context *ctx) {
Expand Down

0 comments on commit 0c1a711

Please sign in to comment.