httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@locus.apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_setenvif.c
Date Tue, 06 Jun 2000 15:01:05 GMT
coar        00/06/06 08:01:05

  Modified:    src/modules/standard mod_setenvif.c
  Log:
  	If we're going to use the same routine to create the server and
  	directory records, we need to wrap it so the data types match.
  	As pointed out by Mike Gardiner.
  
  Revision  Changes    Path
  1.31      +19 -5     apache-1.3/src/modules/standard/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_setenvif.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -u -r1.30 -r1.31
  --- mod_setenvif.c	2000/06/05 16:08:18	1.30
  +++ mod_setenvif.c	2000/06/06 15:01:03	1.31
  @@ -154,7 +154,7 @@
    * the URI has been mapped to a file and we have anything from the
    * .htaccess file and <Directory> and <Files> containers).
    */
  -static void *create_setenvif_config(pool *p, char *dummy)
  +static void *create_setenvif_config(pool *p)
   {
       sei_cfg_rec *new = (sei_cfg_rec *) ap_palloc(p, sizeof(sei_cfg_rec));
   
  @@ -162,6 +162,16 @@
       return (void *) new;
   }
   
  +static void *create_setenvif_config_svr(pool *p, server_rec *dummy)
  +{
  +    return create_setenvif_config(p);
  +}
  +
  +static void *create_setenvif_config_dir(pool *p, char *dummy)
  +{
  +    return create_setenvif_config(p);
  +}
  +
   static void *merge_setenvif_config(pool *p, void *basev, void *overridesv)
   {
       sei_cfg_rec *a = ap_pcalloc(p, sizeof(sei_cfg_rec));
  @@ -191,13 +201,15 @@
       int i;
       int beenhere = 0;
       unsigned icase;
  +    int perdir;
   
       /*
        * Determine from our context into which record to put the entry.
        * cmd->path == NULL means we're in server-wide context; otherwise,
        * we're dealing with a per-directory setting.
        */
  -    sconf = (cmd->path != NULL)
  +    perdir = (cmd->path != NULL);
  +    sconf = perdir
   	? (sei_cfg_rec *) mconfig
   	: (sei_cfg_rec *) ap_get_module_config(cmd->server->module_config,
   					       &setenvif_module);
  @@ -354,9 +366,11 @@
       table_entry *elts;
       const char *val;
       int i, j;
  +    int perdir;
       char *last_name;
   
  -    if (ap_table_get(r->notes, SEI_MAGIC_HEIRLOOM) == NULL) {
  +    perdir = (ap_table_get(r->notes, SEI_MAGIC_HEIRLOOM) != NULL);
  +    if (! perdir) {
   	ap_table_set(r->notes, SEI_MAGIC_HEIRLOOM, "post-read done");
   	sconf  = (sei_cfg_rec *) ap_get_module_config(r->server->module_config,
   						      &setenvif_module);
  @@ -439,9 +453,9 @@
   {
       STANDARD_MODULE_STUFF,
       NULL,                       /* initializer */
  -    create_setenvif_config,     /* dir config creater */
  +    create_setenvif_config_dir, /* dir config creater */
       merge_setenvif_config,      /* dir merger --- default is to override */
  -    create_setenvif_config,     /* server config */
  +    create_setenvif_config_svr, /* server config */
       merge_setenvif_config,      /* merge server configs */
       setenvif_module_cmds,       /* command table */
       NULL,                       /* handlers */
  
  
  

Mime
View raw message