httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] ap_pcfg_openfile knows about device files
Date Fri, 08 May 1998 20:07:30 GMT
Dean Gaudet wrote:
> 
> 
> 
> On Fri, 8 May 1998, Jim Jagielski wrote:
> 
> > Dean Gaudet wrote:
> > > 
> > > 
> > > 
> > > On Fri, 8 May 1998, Jim Jagielski wrote:
> > > 
> > > > This patch removes the unvoted_DISALLOW_DEVICE_ACCESS wrapper so
> > > > now ap_pcfg_openfile can stop opening of non-/dev/null devices.
> > > > Also, as per Dean's suggestion, it now uses ap_pfopen instead of
> > > > fopen. However, this required some API changes... PLEASE review
> > > > and comment.
> > > 
> > > Hmm I was trying to remember why I said that :)  Now I remember --
> > > timeouts. 
> > > 
> > > Technically speaking you don't need an API change.  You can create a
> > > structure with the pool and FILE * in it and pass that as the void*.
> > 
> > It's still a change to what configfile_t looks like though... Thus, the
> > API change.
> 
> No it doesn't.  configfile_t needs no change.  You need to create a new
> structure, one that contains FILE * and pool *, and use it for the param
> in the configfile_t structure.
> 

But then that changes the gets/getc functions since param is used to
send that info to ->getch, ->getstr and ->close and which point we'd
need to wrap fgets/fgetc or adjust ap_cfg_getline (for example) to
use cfp->param->FILE.

And if external modules know about ag_cfg_getline, then they need to
know about that new structure which, to me, also implies an API change.

And I think it's useful that configfile_t knows it's pool as well :)
-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message