Skip to content

Commit

Permalink
Merge r1907242 from trunk:
Browse files Browse the repository at this point in the history
* memcache/apr_memcache.c (conn_connect): Allow use of IPv6
  rather than forcing name resolution to IPv4 only.

Submitted by: Lubos Uhliarik <luhliari redhat.com>
Github: closes #39


git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1907244 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Feb 3, 2023
1 parent c53ea8c commit fb3feeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions memcache/apr_memcache.c
Expand Up @@ -290,9 +290,9 @@ static apr_status_t conn_connect(apr_memcache_conn_t *conn)
apr_status_t rv = APR_SUCCESS;
apr_sockaddr_t *sa;
#if APR_HAVE_SOCKADDR_UN
apr_int32_t family = conn->ms->host[0] != '/' ? APR_INET : APR_UNIX;
apr_int32_t family = conn->ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
#else
apr_int32_t family = APR_INET;
apr_int32_t family = APR_UNSPEC;
#endif

rv = apr_sockaddr_info_get(&sa, conn->ms->host, family, conn->ms->port, 0, conn->p);
Expand Down Expand Up @@ -328,9 +328,9 @@ mc_conn_construct(void **conn_, void *params, apr_pool_t *pool)
apr_pool_t *tp;
apr_memcache_server_t *ms = params;
#if APR_HAVE_SOCKADDR_UN
apr_int32_t family = ms->host[0] != '/' ? APR_INET : APR_UNIX;
apr_int32_t family = ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
#else
apr_int32_t family = APR_INET;
apr_int32_t family = APR_UNSPEC;
#endif

rv = apr_pool_create(&np, pool);
Expand Down

0 comments on commit fb3feeb

Please sign in to comment.