You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2023/02/03 16:27:07 UTC

svn commit: r1907244 - in /apr/apr-util/branches/1.7.x: ./ memcache/apr_memcache.c

Author: jorton
Date: Fri Feb  3 16:27:06 2023
New Revision: 1907244

URL: http://svn.apache.org/viewvc?rev=1907244&view=rev
Log:
Merge r1907242 from trunk:

* 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

Modified:
    apr/apr-util/branches/1.7.x/   (props changed)
    apr/apr-util/branches/1.7.x/memcache/apr_memcache.c

Propchange: apr/apr-util/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1907242

Modified: apr/apr-util/branches/1.7.x/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/memcache/apr_memcache.c?rev=1907244&r1=1907243&r2=1907244&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/memcache/apr_memcache.c (original)
+++ apr/apr-util/branches/1.7.x/memcache/apr_memcache.c Fri Feb  3 16:27:06 2023
@@ -290,9 +290,9 @@ static apr_status_t conn_connect(apr_mem
     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);
@@ -328,9 +328,9 @@ mc_conn_construct(void **conn_, void *pa
     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);