On 11/22/20 11:21 PM, yla...@apache.org wrote:
> Author: ylavic
> Date: Sun Nov 22 22:21:30 2020
> New Revision: 1883728
>
> URL: http://svn.apache.org/viewvc?rev=1883728&view=rev
> Log:
> apr_sockaddr_ip_get[buf]: handle APR_UNIX family.
>
> For unix sockets, return the path (sun_path).
>
> Modified:
> apr/apr/trunk/network_io/unix/sockaddr.c
>
> Modified: apr/apr/trunk/network_io/unix/sockaddr.c
> URL:
> http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sockaddr.c?rev=1883728&r1=1883727&r2=1883728&view=diff
> ==============================================================================
> --- apr/apr/trunk/network_io/unix/sockaddr.c (original)
> +++ apr/apr/trunk/network_io/unix/sockaddr.c Sun Nov 22 22:21:30 2020
> @@ -118,6 +118,14 @@ static apr_status_t get_remote_addr(apr_
> APR_DECLARE(apr_status_t) apr_sockaddr_ip_getbuf(char *buf, apr_size_t
> buflen,
> apr_sockaddr_t *sockaddr)
> {
> +#if APR_HAVE_SOCKADDR_UN && 0
Why && 0?
> + if (sockaddr->family == APR_UNIX) {
> + apr_size_t len = (apr_size_t)sockaddr->ipaddr_len;
> + apr_cpystrn(buf, buflen < len ? buflen : len, sockaddr->ipaddr_ptr);
> + return APR_SUCCESS;
> + }
> +#endif
> +
> if (!apr_inet_ntop(sockaddr->family, sockaddr->ipaddr_ptr, buf, buflen))
> {
> return APR_ENOSPC;
> }
>
>
>
Regards
RĂ¼diger