httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_config.c
Date Fri, 29 Mar 2002 02:00:20 GMT
dougm       02/03/28 18:00:20

  Modified:    modules/ssl ssl_engine_config.c
  Log:
  add ssl_config_server_new function to fold some duplication in server
  create/merge and to make sure merge config is fully inititialized
  
  Revision  Changes    Path
  1.58      +15 -10    httpd-2.0/modules/ssl/ssl_engine_config.c
  
  Index: ssl_engine_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- ssl_engine_config.c	29 Mar 2002 01:56:40 -0000	1.57
  +++ ssl_engine_config.c	29 Mar 2002 02:00:20 -0000	1.58
  @@ -200,14 +200,11 @@
       memset(mctx->pks->keys, 0, sizeof(mctx->pks->keys));
   }
   
  -/*
  - *  Create per-server SSL configuration
  - */
  -void *ssl_config_server_create(apr_pool_t *p, server_rec *s)
  +static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
   {
       SSLSrvConfigRec *sc = apr_palloc(p, sizeof(*sc));
   
  -    sc->mc                     = ssl_config_global_create(s);
  +    sc->mc                     = NULL;
       sc->enabled                = UNSET;
       sc->vhost_id               = NULL;  /* set during module init */
       sc->vhost_id_len           = 0;     /* set during module init */
  @@ -223,6 +220,18 @@
       return sc;
   }
   
  +/*
  + *  Create per-server SSL configuration
  + */
  +void *ssl_config_server_create(apr_pool_t *p, server_rec *s)
  +{
  +    SSLSrvConfigRec *sc = ssl_config_server_new(p);
  +
  +    sc->mc = ssl_config_global_create(s);
  +
  +    return sc;
  +}
  +
   #define cfgMerge(el,unset)  mrg->el = (add->el == (unset)) ? base->el : add->el
   #define cfgMergeArray(el)   mrg->el = apr_array_append(p, add->el, base->el)
   #define cfgMergeString(el)  cfgMerge(el, NULL)
  @@ -281,11 +290,7 @@
   {
       SSLSrvConfigRec *base = (SSLSrvConfigRec *)basev;
       SSLSrvConfigRec *add  = (SSLSrvConfigRec *)addv;
  -    SSLSrvConfigRec *mrg  = (SSLSrvConfigRec *)apr_palloc(p, sizeof(*mrg));
  -
  -    modssl_ctx_init_proxy(mrg, p);
  -
  -    modssl_ctx_init_server(mrg, p);
  +    SSLSrvConfigRec *mrg  = ssl_config_server_new(p);
   
       cfgMerge(mc, NULL);
       cfgMergeBool(enabled);
  
  
  

Mime
View raw message