httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Possible proxy bug in hybrid server
Date Thu, 22 Apr 1999 13:01:03 GMT

I haven't looked at this code, but just by looking at the variable types
and names, I think this stuff can be removed from thread local storage in
apr regardless of what we do with the staticness of these variables.
Becuase apr will be responsible for creating the connection, the hostent
will most likely disappear into the apr call, and it will not be needed in
the Apache code.

The same goes for the ipaddr variable.

I would need to investigate the charpbuf to determine what it is being
used for.

Personally, I would ignore multithread.[ch] for now.  Let's finish apr and
see what code that lets us get rid of before we start ripping other stuff

All MHO of course.


On Thu, 22 Apr 1999, Manoj Kasichainula wrote:

> While writing a patch to get rid of multithread.[ch] from the hybrid
> server, I noticed this:
> proxy_util.c:836
>     static APACHE_TLS struct hostent hpbuf;
>     static APACHE_TLS u_long ipaddr;
>     static APACHE_TLS char *charpbuf[2];
> For 1.3, on Unix, APACHE_TLS is #defined to nothing. On Windows, it
> uses "__declspec(thread)". I guess this was a fix to get around thread
> unsafeness in the proxy on NT. But why do these need to be static at
> all?
> We can save the effort of abstracting out thread-local storage for
> APR if we get rid of these statics.
> -- 
> Manoj Kasichainula - manojk at io dot com -
> "We can't protect the idiot." - David Vance of Glaxo Wellcome

Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message