You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Olaf Hering <ol...@suse.de> on 2008/01/23 15:06:47 UTC

[PATCH] use ipv4 if the ipv6 address cant be reached

Fall back to ipv4 if the host has an ipv6 address,
but doesnt respond to ipv6 right now.
This change worked for us.

https://bugzilla.novell.com/show_bug.cgi?id=193350

---
 subversion/libsvn_ra_svn/client.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--- a/subversion/libsvn_ra_svn/client.c
+++ b/subversion/libsvn_ra_svn/client.c
@@ -145,10 +145,30 @@ static svn_error_t *make_connection(cons
     return svn_error_wrap_apr(status, _("Can't create socket"));
 
   status = apr_socket_connect(*sock, sa);
+  if (!status)
+	  goto out;
+  if (sa->family == APR_INET6) {
+    status = apr_sockaddr_info_get(&sa, hostname, APR_INET, port, 0, pool);
+    if (status)
+      return svn_error_createf(status, NULL, _("Unknown hostname '%s'"),
+                               hostname);
+#ifdef MAX_SECS_TO_LINGER
+    /* ### old APR interface */
+    status = apr_socket_create(sock, sa->family, SOCK_STREAM, pool);
+#else
+    status = apr_socket_create(sock, sa->family, SOCK_STREAM, APR_PROTO_TCP,
+                               pool);
+#endif
+    if (status)
+      return svn_error_wrap_apr(status, _("Can't create socket"));
+
+    status = apr_socket_connect(*sock, sa);
+  }
   if (status)
     return svn_error_wrap_apr(status, _("Can't connect to host '%s'"),
                               hostname);
 
+out:
   return SVN_NO_ERROR;
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] do not use neon.la files

Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
2008-01-23 16:09:09 Olaf Hering napisaƂ(a):
> We removed most static libs and the .la files.
> Maybe the change below will work for everyone.
> 
> Index: build/ac-macros/neon.m4
> ===================================================================
> --- build/ac-macros/neon.m4.orig	2007-10-08 04:23:55.000000000 +0200
> +++ build/ac-macros/neon.m4	2007-11-26 23:12:19.000000000 +0100
> @@ -143,7 +143,7 @@ AC_DEFUN(SVN_NEON_CONFIG,
>             test "$svn_allowed_neon" = "any"; then
>              svn_allowed_neon_on_system="yes"
>              SVN_NEON_INCLUDES=[`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`]
> -            NEON_LIBS=`$neon_config --la-file`
> +            NEON_LIBS=`$neon_config --libs`
>              CFLAGS=["$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"]
>              svn_lib_neon="yes"
>              break
> 

-1 until `neon-config --libs` is fixed. Currently it contains LDFLAGS and
libraries which are dependencies of Neon.
It's still broken in Neon trunk.

`neon-config --la-file` doesn't cause any problems.

-- 
Arfrever Frehtes Taifersar Arahesis

[PATCH] do not use neon.la files

Posted by Olaf Hering <ol...@suse.de>.
We removed most static libs and the .la files.
Maybe the change below will work for everyone.

Index: build/ac-macros/neon.m4
===================================================================
--- build/ac-macros/neon.m4.orig	2007-10-08 04:23:55.000000000 +0200
+++ build/ac-macros/neon.m4	2007-11-26 23:12:19.000000000 +0100
@@ -143,7 +143,7 @@ AC_DEFUN(SVN_NEON_CONFIG,
            test "$svn_allowed_neon" = "any"; then
             svn_allowed_neon_on_system="yes"
             SVN_NEON_INCLUDES=[`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`]
-            NEON_LIBS=`$neon_config --la-file`
+            NEON_LIBS=`$neon_config --libs`
             CFLAGS=["$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"]
             svn_lib_neon="yes"
             break

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] use ipv4 if the ipv6 address cant be reached

Posted by David Glasser <gl...@davidglasser.net>.
Has anyone familiar with these issues had the chance to review this?

--dave

On Jan 23, 2008 7:06 AM, Olaf Hering <ol...@suse.de> wrote:
>
> Fall back to ipv4 if the host has an ipv6 address,
> but doesnt respond to ipv6 right now.
> This change worked for us.
>
> https://bugzilla.novell.com/show_bug.cgi?id=193350
>
> ---
>  subversion/libsvn_ra_svn/client.c |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> --- a/subversion/libsvn_ra_svn/client.c
> +++ b/subversion/libsvn_ra_svn/client.c
> @@ -145,10 +145,30 @@ static svn_error_t *make_connection(cons
>      return svn_error_wrap_apr(status, _("Can't create socket"));
>
>    status = apr_socket_connect(*sock, sa);
> +  if (!status)
> +         goto out;
> +  if (sa->family == APR_INET6) {
> +    status = apr_sockaddr_info_get(&sa, hostname, APR_INET, port, 0, pool);
> +    if (status)
> +      return svn_error_createf(status, NULL, _("Unknown hostname '%s'"),
> +                               hostname);
> +#ifdef MAX_SECS_TO_LINGER
> +    /* ### old APR interface */
> +    status = apr_socket_create(sock, sa->family, SOCK_STREAM, pool);
> +#else
> +    status = apr_socket_create(sock, sa->family, SOCK_STREAM, APR_PROTO_TCP,
> +                               pool);
> +#endif
> +    if (status)
> +      return svn_error_wrap_apr(status, _("Can't create socket"));
> +
> +    status = apr_socket_connect(*sock, sa);
> +  }
>    if (status)
>      return svn_error_wrap_apr(status, _("Can't connect to host '%s'"),
>                                hostname);
>
> +out:
>    return SVN_NO_ERROR;
>  }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>



-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org