Commit 5124a18e authored by Stefan Eissing's avatar Stefan Eissing
Browse files

On the trunk:

Cleanup mod_http2 beamer registry on server reload. Fixes PR60510.

 * modules/http2/h2_bucket_beam.c
   register cleanup function on installation that NULLs the beamer
   registry on pool cleanup.

Patch by: Pavel Mateja <pavel@verotel.cz
          me



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1775833 13f79535-47bb-0310-9956-ffa450edef68
parent 0aa086b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.5.0

  *) mod_http2: cleanup beamer registry on server reload, Fixes PR60510.
     [Pavel Mateja <pavel@verotel.cz>, Stefan Eissing]
     
  *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
     backend connection, happening with LogLevel trace2 or higher configured,
     or at any log level with compilers not detected as C99 compliant (e.g.
+10 −1
Original line number Diff line number Diff line
@@ -154,9 +154,18 @@ const apr_bucket_type_t h2_bucket_type_beam = {

static apr_array_header_t *beamers;

static apr_status_t cleanup_beamers(void *dummy)
{
    (void)dummy;
    beamers = NULL;
    return APR_SUCCESS;
}

void h2_register_bucket_beamer(h2_bucket_beamer *beamer)
{
    if (!beamers) {
        apr_pool_cleanup_register(apr_hook_global_pool, NULL,
                                  cleanup_beamers, apr_pool_cleanup_null);
        beamers = apr_array_make(apr_hook_global_pool, 10, 
                                 sizeof(h2_bucket_beamer*));
    }