httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: local/remote address in conn_rec
Date Wed, 20 Oct 1999 14:12:11 GMT
On Wed, 20 Oct 1999 09:52:49 -0400 (EDT), Ryan Bloom wrote:

>>   After gettings 2.0 to build and run on OS/2 I noticed that the access log
>> is showing rubbish for the client address. I traced the problem back to the
>> fact that the client & server address records (sa_client, sa_server) passed
>> to ap_new_connection() are never set.
>> 
>>   The question is, should we still be using sockaddr_in structures with APR?
>> I would think no, which would mean the conn_rec's
>> 
>>     struct sockaddr_in local_addr;	/* local address */
>>     struct sockaddr_in remote_addr;	/* remote address */
>> 
>> will need to change, but to what? Perhaps two ap_socket_t *'s ? That would
>> allow things like ap_getipaddr() & ap_get_remote_hostname() to be used on
>> them.
>
>Do we really need both of them?  Couldn't we pass ONE ap_socket_t to
>ap_new_connection, and get the same data out of it?  Or, am I missing
>something?  I think I designed APR to allow for this, but I may not fully
>understand where local_addr and remote_addr are being used.  It's been a
>while since I've been near them.

Err, yeah, I guess one would do it. For some reason I was thinking that one
would be the listener but you can get everything you need from just the
client socket.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message