Changeset 235e109 in mod_gnutls for src/gnutls_util.c


Ignore:
Timestamp:
Apr 9, 2018, 2:24:59 AM (2 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, debian/stretch-backports, master, proxy-ticket, upstream
Children:
23e98b3
Parents:
fe21671
Message:

Unify initialization of mod_gnutls connection context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_util.c

    rfe21671 r235e109  
    126126    return rv;
    127127}
     128
     129
     130
     131mgs_handle_t *init_gnutls_ctxt(conn_rec *c)
     132{
     133    mgs_handle_t *ctxt = (mgs_handle_t *)
     134        ap_get_module_config(c->conn_config, &gnutls_module);
     135    if (ctxt == NULL)
     136    {
     137        ctxt = apr_pcalloc(c->pool, sizeof (*ctxt));
     138        ap_set_module_config(c->conn_config, &gnutls_module, ctxt);
     139
     140        /* Get mod_gnutls server configuration */
     141        mgs_srvconf_rec *sc = (mgs_srvconf_rec *)
     142            ap_get_module_config(c->base_server->module_config,
     143                                 &gnutls_module);
     144
     145        /* Set up connection and server references */
     146        ctxt->c = c;
     147        ctxt->sc = sc;
     148        /* Default, unconditionally changed in proxy setup functions */
     149        ctxt->is_proxy = GNUTLS_ENABLED_FALSE;
     150    }
     151    return ctxt;
     152}
Note: See TracChangeset for help on using the changeset viewer.