This change causes a problem on NetWare. In the function alloc_listener() before the change, the code did not allow the variable addr to be NULL. In the changed code addr is allowed to be NULL which means that the call to strcmp() after the call to apr_sockaddr_port_get() causes NetWare to fault.
Hmm. Now, I wonder how reliant we are upon the sockaddr_t having a non-NULL hostname field. Are we going to be allowed to leave it NULL? apr_sockaddr_info_get's documentation explicitly says it allows NULL inputs, but it doesn't say what the 'hostname' field will turn into.
The IPv4 apr_sockaddr_info_get impl. just hardcodes sa->hostname to be "0.0.0.0", while the IPv6 branch (getaddrinfo impl) will leave it NULL. So, we may not reuse listeners on IPv4 right now (NULL gets translated into "0.0.0.0" and stored as that string in the sockaddr_t). I guess I'll prefer to have the hostname be what we passed into apr_sockaddr_info_get - that is the sa->hostname should be NULL even with IPv4 implementations.
Then, we'll have to fix up the references to sa->hostname to allow for NULL values.
Thoughts? Make sense? -- justin