On Mon, Aug 25, 2003 at 09:27:03AM +0100, Joe Orton wrote:
> Also the below conditional looks dubious - previous->bind_addr should be
> lr->bind_addr, and the lr->next family is never checked?
*cough*, yes
> - *((in_addr_t *)lr->bind_addr->ipaddr_ptr) == INADDR_ANY &&
> + lr->bind_addr->sa.sin.sin_addr.s_addr == INADDR_ANY &&
> lr->bind_addr->port == previous->bind_addr->port &&
> previous->bind_addr->family == APR_INET6 &&
> IN6_IS_ADDR_UNSPECIFIED(
> - (struct in6_addr*)(previous->bind_addr->ipaddr_ptr)) &&
> + previous->bind_addr->sa.sin6.sin6_addr.s6_addr) &&
That's what I had first, Justin added this to get it compiling on
Darwin, so unless I'm picking things up wrong I'd suggest leaving
it.
The rest looks better alright, attachted patch works and running for me.
--
Colm MacC�rthaigh Public Key: [EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.stdlib.net/
--- /home/colmmacc/httpd-2.0/server/listen.c Mon Aug 25 12:14:12 2003
+++ httpd-2.0/server/listen.c Mon Aug 25 12:22:09 2003
@@ -355,7 +355,7 @@
*/
if (previous != NULL &&
lr->bind_addr->family == APR_INET &&
- *((in_addr_t *)lr->bind_addr->ipaddr_ptr) == INADDR_ANY &&
+ lr->bind_addr->sa.sin.sin_addr.s_addr == INADDR_ANY &&
lr->bind_addr->port == previous->bind_addr->port &&
previous->bind_addr->family == APR_INET6 &&
IN6_IS_ADDR_UNSPECIFIED(
@@ -382,10 +382,10 @@
*/
if (lr->next != NULL && lr->bind_addr->family == APR_INET6 &&
IN6_IS_ADDR_UNSPECIFIED(
- (struct in6_addr*)(previous->bind_addr->ipaddr_ptr)) &&
+ (struct in6_addr*)(lr->bind_addr->ipaddr_ptr)) &&
lr->bind_addr->port == lr->next->bind_addr->port &&
- *((in_addr_t *)lr->next->bind_addr->ipaddr_ptr)
- == INADDR_ANY) {
+ lr->next->bind_addr->family == APR_INET &&
+ lr->next->bind_addr->sa.sin.sin_addr.s_addr == INADDR_ANY) {
/* Remove the current listener from the list */
if (previous) {